Merge pull request #736 from MiYanni/sdk-repo-shared-fixes
SDK repo warning fixes
This commit is contained in:
Коммит
2178cde2f4
|
@ -146,8 +146,10 @@ namespace Azure.Core
|
|||
|
||||
public Response UpdateStatus(CancellationToken cancellationToken = default) => UpdateStatusAsync(async: false, cancellationToken).EnsureCompleted();
|
||||
|
||||
#pragma warning disable CA1822
|
||||
//TODO: This is currently unused.
|
||||
public string Id => throw new NotImplementedException();
|
||||
#pragma warning restore CA1822
|
||||
|
||||
public T Value
|
||||
{
|
||||
|
@ -353,4 +355,4 @@ namespace Azure.Core
|
|||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ namespace Azure.Core
|
|||
{
|
||||
"D" => element.GetDateTimeOffset(),
|
||||
"U" => DateTimeOffset.FromUnixTimeSeconds(element.GetInt64()),
|
||||
_ => TypeFormatters.ParseDateTimeOffset(element.GetString(), format)
|
||||
_ => TypeFormatters.ParseDateTimeOffset(element.GetString())
|
||||
};
|
||||
|
||||
public static TimeSpan GetTimeSpan(in this JsonElement element, string format) =>
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace Azure.Core
|
|||
}
|
||||
}
|
||||
|
||||
public static DateTimeOffset ParseDateTimeOffset(string value, string format) =>
|
||||
public static DateTimeOffset ParseDateTimeOffset(string value) =>
|
||||
DateTimeOffset.Parse(value, CultureInfo.InvariantCulture);
|
||||
|
||||
public static TimeSpan ParseTimeSpan(string value, string format) => format switch
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Azure.Core
|
|||
public static DateTimeOffset GetDateTimeOffsetValue(this XElement element, string format) => format switch
|
||||
{
|
||||
"U" => DateTimeOffset.FromUnixTimeSeconds((long)element),
|
||||
_ => TypeFormatters.ParseDateTimeOffset(element.Value, format)
|
||||
_ => TypeFormatters.ParseDateTimeOffset(element.Value)
|
||||
};
|
||||
|
||||
public static TimeSpan GetTimeSpanValue(this XElement element, string format) => TypeFormatters.ParseTimeSpan(element.Value, format);
|
||||
|
|
Загрузка…
Ссылка в новой задаче