Ejemplo n.º 1
0
        internal static CsdlSchema Schema(
            string namespaceName,
            string alias = null,
            Version version = null,
            CsdlStructuredType[] csdlStructuredTypes = default(CsdlStructuredType[]),
            CsdlEnumType[] csdlEnumTypes = default(CsdlEnumType[]),
            CsdlOperation[] csdlOperations = default(CsdlOperation[]),
            CsdlTerm[] csdlTerms = default(CsdlTerm[]),
            CsdlEntityContainer[] csdlEntityContainers = default(CsdlEntityContainer[]),
            CsdlAnnotations[] csdlAnnotations = default(CsdlAnnotations[]),
            CsdlTypeDefinition[] csdlTypeDefinitions = default(CsdlTypeDefinition[]),
            CsdlDocumentation documentation = null,
            CsdlLocation location = null)
        {
            if (csdlStructuredTypes == null)
            {
                csdlStructuredTypes = new CsdlStructuredType[] { };
            }

            if (csdlEnumTypes == null)
            {
                csdlEnumTypes = new CsdlEnumType[] { };
            }

            if (csdlOperations == null)
            {
                csdlOperations = new CsdlOperation[] { };
            }

            if (csdlTerms == null)
            {
                csdlTerms = new CsdlTerm[] { };
            }

            if (csdlEntityContainers == null)
            {
                csdlEntityContainers = new CsdlEntityContainer[] { };
            }

            if (csdlAnnotations == null)
            {
                csdlAnnotations = new CsdlAnnotations[] { };
            }

            if (csdlTypeDefinitions == null)
            {
                csdlTypeDefinitions = new CsdlTypeDefinition[] { };
            }

            var csdlSchema = new CsdlSchema(
                namespaceName,
                alias,
                version,
                csdlStructuredTypes,
                csdlEnumTypes,
                csdlOperations,
                csdlTerms,
                csdlEntityContainers,
                csdlAnnotations,
                csdlTypeDefinitions,
                documentation /*documentation*/,
                location /*location*/);

            return csdlSchema;
        }
 protected CsdlSemanticsStructuredTypeDefinition(CsdlSemanticsSchema context, CsdlStructuredType type)
     : base(type)
 {
     this.context = context;
 }