Search Results for

    Show / Hide Table of Contents

    Class TypeBasedIdValidator

    A utility class for validating the data object identifier.

    Inheritance
    System.Object
    TypeBasedIdValidator
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: VMS.TPS.Common.Model.API
    Assembly: VMS.TPS.Common.Model.API.dll
    Syntax
    public static class TypeBasedIdValidator

    Methods

    IsValidId(String, ApiDataObject, StringBuilder)

    Returns true if the given identifier is valid for the given data object.

    Declaration
    public static bool IsValidId(string id, ApiDataObject dataObject, StringBuilder errorHint)
    Parameters
    Type Name Description
    System.String id

    The new identifier to check.

    ApiDataObject dataObject

    The data object for whom the new identifier is checked.

    System.Text.StringBuilder errorHint

    The error string that is set if the validation failed.

    Returns
    Type Description
    System.Boolean

    true if the given identifier is valid for the given data object.

    ThrowIfNotValidId(String, ApiDataObject)

    Throws System.ArgumentException if the given identifier is not valid for the given data object.

    Declaration
    public static void ThrowIfNotValidId(string id, ApiDataObject dataObject)
    Parameters
    Type Name Description
    System.String id

    The new identifier to check.

    ApiDataObject dataObject

    The data object for whom the new identifier is checked.

    In This Article
    Back to top