sdk/dotnet/src/Microsoft.Datasync.Client/Serialization/ServiceSerializer.cs
/// <summary>
/// Returns the version of the instance.  If one is not present, returns null.
/// </summary>
/// <param name="instance">The subject instance.</param>
/// <returns>The version of the instance, or <c>null</c>.</returns>
Returns the version of the instance.  If one is not present, returns null.
Returns the version of the instance . If one is not present returns null .
public static string GetVersion(JObject instance)
        {
            foreach (JProperty property in instance.Properties())
            {
                if (string.Equals(property.Name, SystemProperties.JsonVersionProperty, StringComparison.OrdinalIgnoreCase))
                {
                    return instance.Value<string>(property.Name);
                }
            }
            return null;
        }
public static string GetVersion ( JObject instance ) { foreach ( JProperty property in instance . Properties ( ) ) { if ( string . Equals ( property . Name , SystemProperties . JsonVersionProperty , StringComparison . OrdinalIgnoreCase ) ) { return instance . Value < string > ( property . Name ) ; } } return null ; }
Returns the version of the instance.
Returns the version of the instance .
The version of the instance, or null
The version of the instance or null
instance
JObject
The subject instance.
The subject instance .