Show / Hide Table of Contents

    Class GraphProperty

    The IGraphProperty helpers and extensions.

    Inheritance
    Object
    GraphProperty
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.Graph.Communications.Common.Transport
    Assembly: Microsoft.Graph.Communications.Common.dll
    Syntax
    public static class GraphProperty

    Fields

    ContentType

    The content type

    Declaration
    public const string ContentType = "content"
    Field Value
    Type Description
    String

    RequestType

    The request type

    Declaration
    public const string RequestType = "request"
    Field Value
    Type Description
    String

    Methods

    Add(ICollection<IGraphProperty>, String, Object, String)

    Adds the property to the exchange.

    Declaration
    public static IGraphProperty Add(this ICollection<IGraphProperty> properties, string key, object value, string type = null)
    Parameters
    Type Name Description
    ICollection<IGraphProperty> properties

    The properties.

    String key

    The key.

    Object value

    The value.

    String type

    The type.

    Returns
    Type Description
    IGraphProperty

    The added IGraphProperty.

    Add<T>(ICollection<IGraphProperty>, String, T, String)

    Adds the property to the exchange.

    Declaration
    public static IGraphProperty<T> Add<T>(this ICollection<IGraphProperty> properties, string key, T value, string type = null)
    Parameters
    Type Name Description
    ICollection<IGraphProperty> properties

    The properties.

    String key

    The key.

    T value

    The value.

    String type

    The type.

    Returns
    Type Description
    IGraphProperty<T>

    The added IGraphProperty<T>.

    Type Parameters
    Name Description
    T

    The expected type of the property.

    Contains(IEnumerable<IGraphProperty>, String)

    Finds the property in the given exchange.

    Declaration
    public static bool Contains(this IEnumerable<IGraphProperty> properties, string key)
    Parameters
    Type Name Description
    IEnumerable<IGraphProperty> properties

    The properties.

    String key

    The key.

    Returns
    Type Description
    Boolean

    The found IGraphProperty.

    ContentProperty(String, Object)

    Creates the property of content type.

    Declaration
    public static IGraphProperty ContentProperty(string key, object value)
    Parameters
    Type Name Description
    String key

    The key.

    Object value

    The values.

    Returns
    Type Description
    IGraphProperty

    The content IGraphProperty.

    ContentProperty<T>(String, T)

    Creates the property of content type.

    Declaration
    public static IGraphProperty<T> ContentProperty<T>(string key, T value)
    Parameters
    Type Name Description
    String key

    The key.

    T value

    The values.

    Returns
    Type Description
    IGraphProperty<T>

    The content IGraphProperty<T>.

    Type Parameters
    Name Description
    T

    The type of the property to create.

    ConvertProperty<T>(IGraphProperty)

    Converts the property.

    Declaration
    public static IGraphProperty<T> ConvertProperty<T>(this IGraphProperty property)
    Parameters
    Type Name Description
    IGraphProperty property

    The property.

    Returns
    Type Description
    IGraphProperty<T>

    The IGraphProperty<T> with the expected generic type if the types match, null otherwise.

    Type Parameters
    Name Description
    T

    The type of value expected.

    Find(IEnumerable<IGraphProperty>, String)

    Finds the property in the given exchange.

    Declaration
    public static IGraphProperty Find(this IEnumerable<IGraphProperty> properties, string key)
    Parameters
    Type Name Description
    IEnumerable<IGraphProperty> properties

    The properties.

    String key

    The key.

    Returns
    Type Description
    IGraphProperty

    The found IGraphProperty.

    Find<T>(IEnumerable<IGraphProperty>, String)

    Finds the property in the given exchange.

    Declaration
    public static IGraphProperty<T> Find<T>(this IEnumerable<IGraphProperty> properties, string key)
    Parameters
    Type Name Description
    IEnumerable<IGraphProperty> properties

    The properties.

    String key

    The key.

    Returns
    Type Description
    IGraphProperty<T>

    The found IGraphProperty<T>.

    Type Parameters
    Name Description
    T

    The expected type of the property.

    Property(String, Object, String)

    Creates a property of the specified type.

    Declaration
    public static IGraphProperty Property(string key, object value, string type = null)
    Parameters
    Type Name Description
    String key

    The key.

    Object value

    The values.

    String type

    The type.

    Returns
    Type Description
    IGraphProperty

    The created IGraphProperty.

    Property<T>(String, T, String)

    Creates a property of the specified type.

    Declaration
    public static IGraphProperty<T> Property<T>(string key, T value, string type = null)
    Parameters
    Type Name Description
    String key

    The key.

    T value

    The value.

    String type

    The type.

    Returns
    Type Description
    IGraphProperty<T>

    The created IGraphProperty<T>.

    Type Parameters
    Name Description
    T

    The type of the property to create.

    RequestProperty(String, Object)

    Creates the property of request type.

    Declaration
    public static IGraphProperty RequestProperty(string key, object value)
    Parameters
    Type Name Description
    String key

    The key.

    Object value

    The value.

    Returns
    Type Description
    IGraphProperty

    The request IGraphProperty.

    RequestProperty<T>(String, T)

    Creates the property of request type.

    Declaration
    public static IGraphProperty<T> RequestProperty<T>(string key, T value)
    Parameters
    Type Name Description
    String key

    The key.

    T value

    The value.

    Returns
    Type Description
    IGraphProperty<T>

    The request IGraphProperty<T>.

    Type Parameters
    Name Description
    T

    The type of the property to create.

    See Also

    IGraphProperty<T>
    IGraphProperty
    Back to top Copyright (c) Microsoft Corporation. All rights reserved.