/// <summary> /// Initialize all the build in type with the given type attributes and properties /// </summary> /// <param name="builtInType">The built In type which is getting initialized</param> /// <param name="name">name of the built in type</param> /// <param name="isAbstract">whether the type is abstract or not</param> /// <param name="isSealed">whether the type is sealed or not</param> /// <param name="baseType">The base type of the built in type</param> private static void InitializeBuiltInTypes(ComplexType builtInType, string name, bool isAbstract, ComplexType baseType) { // Initialize item attributes for all ancestor types EdmType.Initialize(builtInType, name, EdmConstants.EdmNamespace, DataSpace.CSpace, isAbstract, baseType); }
/// <summary> /// Constructs a new instance of EdmType with the given name, namespace and version /// </summary> /// <param name="name">name of the type</param> /// <param name="namespaceName">namespace of the type</param> /// <param name="version">version of the type</param> /// <param name="dataSpace">dataSpace in which this edmtype belongs to</param> /// <exception cref="System.ArgumentNullException">Thrown if either the name, namespace or version arguments are null</exception> internal EdmType(string name, string namespaceName, DataSpace dataSpace) { EntityUtil.GenericCheckArgumentNull(name, "name"); EntityUtil.GenericCheckArgumentNull(namespaceName, "namespaceName"); // Initialize the item attributes EdmType.Initialize(this, name, namespaceName, dataSpace, false, null); }
/// <summary> /// Initializes the enum type /// </summary> /// <param name="builtInTypeKind">The built-in type kind enum value of this enum type</param> /// <param name="name">The name of this enum type</param> /// <param name="enumMemberNames">The member names of this enum type</param> private static void InitializeEnumType(BuiltInTypeKind builtInTypeKind, string name, string[] enumMemberNames) { EnumType enumType = (EnumType)GetBuiltInType(builtInTypeKind); // Initialize item attributes for all ancestor types EdmType.Initialize(enumType, name, EdmConstants.EdmNamespace, DataSpace.CSpace, false, null); for (int i = 0; i < enumMemberNames.Length; i++) { enumType.AddMember(new EnumMember(enumMemberNames[i], i)); } }