Skip to content

XmlContentSerializer.DeserializeFromString(string) method

Defined in

Type: XmlContentSerializer Namespace: Refit Assembly: Refit.Xml.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481, net471

Attributes: [UnconditionalSuppressMessage("Trimming", "IL2026:RequiresUnreferencedCode", Justification = "Refit's XML serialization uses System.Xml.Serialization reflection that trimming cannot statically preserve. Use the Refit source generator for trimmed/AOT apps.")] [UnconditionalSuppressMessage("AOT", "IL3050:RequiresDynamicCode", Justification = "Refit's XML serialization may generate serialization assemblies at runtime. Use the Refit source generator for AOT apps.")]

public T? DeserializeFromString<T>(string content)

View source

Inherited documentation

These docs were inherited from ISynchronousContentDeserializer. The member doesn't override them on this type.

Summary: Deserializes content synchronously into an object of type T.

Type parameters

NameDescription
TThe type to deserialize the content to.

Parameters

NameTypeDescription
contentstringThe already-buffered content string.

Returns: T? -- The deserialized object of type T.