Ejemplo n.º 1
0
        internal static CsdlEntityContainer EntityContainer(
            string name,
            string extends = null,
            CsdlEntitySet[] entitySets = default(CsdlEntitySet[]),
            CsdlSingleton[] singletons = default(CsdlSingleton[]),
            CsdlOperationImport[] operationImports = default(CsdlOperationImport[]),
            CsdlDocumentation documentation = null,
            CsdlLocation location = null)
        {
            if (entitySets == null)
            {
                entitySets = new CsdlEntitySet[] { };
            }

            if (operationImports == null)
            {
                operationImports = new CsdlOperationImport[] { };
            }

            if (singletons == null)
            {
                singletons = new CsdlSingleton[] { };
            }

            return new CsdlEntityContainer(
                name,
                extends,
                entitySets,
                singletons,
                operationImports,
                documentation,
                location);
        }
Ejemplo n.º 2
0
        internal static CsdlEntityType EntityType(
            string name, 
            string baseName = null, 
            bool isAbstract = false,
            bool isOpen = false,
            bool hasStream = false,
            CsdlKey csdlKey = null,
            CsdlProperty[] properties = default(CsdlProperty[]),
            CsdlNavigationProperty[] navProps = default(CsdlNavigationProperty[]),
            CsdlDocumentation documentation = null,
            CsdlLocation location = null)
        {
            if (properties == null)
            {
                properties = new CsdlProperty[] { };
            }

            if (navProps == null)
            {
                navProps = new CsdlNavigationProperty[] { };
            }

            return new CsdlEntityType(
                name,
                baseName, 
                isAbstract,
                isOpen,
                hasStream,
                csdlKey, 
                properties, 
                navProps, 
                documentation, 
                location);
        }
Ejemplo n.º 3
0
 public CsdlEnumType(string name, string underlyingTypeName, bool isFlags, IEnumerable<CsdlEnumMember> members, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.underlyingTypeName = underlyingTypeName;
     this.isFlags = isFlags;
     this.members = new List<CsdlEnumMember>(members);
 }
Ejemplo n.º 4
0
 public CsdlSchema(
     string namespaceName,
     string alias,
     Version version,
     IEnumerable<CsdlStructuredType> structuredTypes,
     IEnumerable<CsdlEnumType> enumTypes,
     IEnumerable<CsdlOperation> operations,
     IEnumerable<CsdlTerm> terms,
     IEnumerable<CsdlEntityContainer> entityContainers,
     IEnumerable<CsdlAnnotations> outOfLineAnnotations,
     IEnumerable<CsdlTypeDefinition> typeDefinitions,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(documentation, location)
 {
     this.alias = alias;
     this.namespaceName = namespaceName;
     this.version = version;
     this.structuredTypes = new List<CsdlStructuredType>(structuredTypes);
     this.enumTypes = new List<CsdlEnumType>(enumTypes);
     this.operations = new List<CsdlOperation>(operations);
     this.terms = new List<CsdlTerm>(terms);
     this.entityContainers = new List<CsdlEntityContainer>(entityContainers);
     this.outOfLineAnnotations = new List<CsdlAnnotations>(outOfLineAnnotations);
     this.typeDefinitions = new List<CsdlTypeDefinition>(typeDefinitions);
 }
Ejemplo n.º 5
0
 public CsdlSchema(
     string namespaceName,
     string alias,
     Version version,
     IEnumerable <CsdlStructuredType> structuredTypes,
     IEnumerable <CsdlEnumType> enumTypes,
     IEnumerable <CsdlOperation> operations,
     IEnumerable <CsdlTerm> terms,
     IEnumerable <CsdlEntityContainer> entityContainers,
     IEnumerable <CsdlAnnotations> outOfLineAnnotations,
     IEnumerable <CsdlTypeDefinition> typeDefinitions,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(documentation, location)
 {
     this.alias                = alias;
     this.namespaceName        = namespaceName;
     this.version              = version;
     this.structuredTypes      = new List <CsdlStructuredType>(structuredTypes);
     this.enumTypes            = new List <CsdlEnumType>(enumTypes);
     this.operations           = new List <CsdlOperation>(operations);
     this.terms                = new List <CsdlTerm>(terms);
     this.entityContainers     = new List <CsdlEntityContainer>(entityContainers);
     this.outOfLineAnnotations = new List <CsdlAnnotations>(outOfLineAnnotations);
     this.typeDefinitions      = new List <CsdlTypeDefinition>(typeDefinitions);
 }
Ejemplo n.º 6
0
 protected CsdlNamedStructuredType(string name, string baseTypeName, bool isAbstract, bool isOpen, IEnumerable<CsdlProperty> properties, CsdlDocumentation documentation, CsdlLocation location)
     : base(properties, documentation, location)
 {
     this.isAbstract = isAbstract;
     this.isOpen = isOpen;
     this.name = name;
     this.baseTypeName = baseTypeName;
 }
Ejemplo n.º 7
0
        public CsdlEntityType(string name, string baseTypeName, bool isAbstract, bool isOpen, bool hasStream, CsdlKey key, IEnumerable<CsdlProperty> properties, IEnumerable<CsdlNavigationProperty> navigationProperties, CsdlDocumentation documentation, CsdlLocation location)
            : base(name, baseTypeName, isAbstract, isOpen, properties, documentation, location)
        {
            this.key = key;
            this.hasStream = hasStream;

            this.navigationProperties = new List<CsdlNavigationProperty>(navigationProperties);
        }
Ejemplo n.º 8
0
 public CsdlEntityContainer(string name, string extends, IEnumerable<CsdlEntitySet> entitySets, IEnumerable<CsdlSingleton> singletons, IEnumerable<CsdlOperationImport> operationImports, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.extends = extends;
     this.entitySets = new List<CsdlEntitySet>(entitySets);
     this.singletons = new List<CsdlSingleton>(singletons);
     this.operationImports = new List<CsdlOperationImport>(operationImports);
 }
Ejemplo n.º 9
0
 public CsdlActionImport(
     string name,
     string schemaOperationQualifiedTypeName,
     string entitySet,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(name, schemaOperationQualifiedTypeName, entitySet, new CsdlOperationParameter[] { }, null /*returnType*/, documentation, location)
 {
 }
Ejemplo n.º 10
0
 public CsdlActionImport(
     string name,
     string schemaOperationQualifiedTypeName,
     string entitySet,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(name, schemaOperationQualifiedTypeName, entitySet, new CsdlOperationParameter[] { }, null /*returnType*/, documentation, location)
 {
 }
Ejemplo n.º 11
0
 public CsdlNavigationProperty(string name, string type, bool? nullable, string partner, bool containsTarget, CsdlOnDelete onDelete, IEnumerable<CsdlReferentialConstraint> referentialConstraints, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.type = type;
     this.nullable = nullable;
     this.partner = partner;
     this.containsTarget = containsTarget;
     this.onDelete = onDelete;
     this.referentialConstraints = referentialConstraints;
 }
Ejemplo n.º 12
0
 public CsdlFunctionImport(
     string name,
     string schemaOperationQualifiedTypeName,
     string entitySet,
     bool includeInServiceDocument,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(name, schemaOperationQualifiedTypeName, entitySet, new CsdlOperationParameter[] { }, null /*returnType*/, documentation, location)
 {
     this.IncludeInServiceDocument = includeInServiceDocument;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CsdlAction"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="parameters">The parameters.</param>
 /// <param name="returnType">The return type of the function.</param>
 /// <param name="isBound">if set to <c>true</c> [is bound].</param>
 /// <param name="entitySetPath">The entity set path.</param>
 /// <param name="documentation">The documentation.</param>
 /// <param name="location">The location in the csdl document of the function.</param>
 public CsdlAction(
     string name,
     IEnumerable <CsdlOperationParameter> parameters,
     CsdlTypeReference returnType,
     bool isBound,
     string entitySetPath,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(name, parameters, returnType, isBound, entitySetPath, documentation, location)
 {
 }
Ejemplo n.º 14
0
 public CsdlFunctionImport(
     string name,
     string schemaOperationQualifiedTypeName,
     string entitySet,
     bool includeInServiceDocument,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(name, schemaOperationQualifiedTypeName, entitySet, new CsdlOperationParameter[] { }, null /*returnType*/, documentation, location)
 {
     this.IncludeInServiceDocument = includeInServiceDocument;
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CsdlAction"/> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="parameters">The parameters.</param>
 /// <param name="returnType">The return type of the function.</param>
 /// <param name="isBound">if set to <c>true</c> [is bound].</param>
 /// <param name="entitySetPath">The entity set path.</param>
 /// <param name="documentation">The documentation.</param>
 /// <param name="location">The location in the csdl document of the function.</param>
 public CsdlAction(
     string name, 
     IEnumerable<CsdlOperationParameter> parameters, 
     CsdlTypeReference returnType, 
     bool isBound, 
     string entitySetPath, 
     CsdlDocumentation documentation, 
     CsdlLocation location)
     : base(name, parameters, returnType, isBound, entitySetPath, documentation, location)
 {
 }
Ejemplo n.º 16
0
 protected CsdlOperationImport(
     string name,
     string schemaOperationQualifiedTypeName,
     string entitySet,
     IEnumerable<CsdlOperationParameter> parameters,
     CsdlTypeReference returnType,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(name, parameters, returnType, documentation, location)
 {
     this.entitySet = entitySet;
     this.SchemaOperationQualifiedTypeName = schemaOperationQualifiedTypeName;
 }
Ejemplo n.º 17
0
 protected CsdlOperationImport(
     string name,
     string schemaOperationQualifiedTypeName,
     string entitySet,
     IEnumerable <CsdlOperationParameter> parameters,
     CsdlTypeReference returnType,
     CsdlDocumentation documentation,
     CsdlLocation location)
     : base(name, parameters, returnType, documentation, location)
 {
     this.entitySet = entitySet;
     this.SchemaOperationQualifiedTypeName = schemaOperationQualifiedTypeName;
 }
 public CsdlSemanticsDocumentation(CsdlDocumentation documentation, CsdlSemanticsModel model)
     : base(documentation)
 {
     this.documentation = documentation;
     this.model = model;
 }
Ejemplo n.º 19
0
        internal static CsdlFunction Function(
            string name, 
            CsdlOperationParameter[] parameters = default(CsdlOperationParameter[]), 
            CsdlTypeReference typeReference = null, 
            bool isBound = false, 
            string entitySetPath = null, 
            bool isComposable = false,
            CsdlDocumentation documentation = null, 
            CsdlLocation location = null)
        {
            if (parameters == null)
            {
                parameters = new CsdlOperationParameter[] { };
            }

            return new CsdlFunction(
                name,
                parameters,
                typeReference,
                isBound,
                entitySetPath,
                isComposable,
                documentation,
                location);
        }
Ejemplo n.º 20
0
 internal static CsdlOperationParameter Parameter(
     string name,
     string fullTypeReferenceName,
     CsdlDocumentation documentation = null,
     CsdlLocation location = null)
 {
     return new CsdlOperationParameter(name, new CsdlNamedTypeReference(fullTypeReferenceName, true, null), documentation, location);
 }
Ejemplo n.º 21
0
 protected CsdlFunctionBase(string name, IEnumerable <CsdlOperationParameter> parameters, CsdlTypeReference returnType, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.parameters = new List <CsdlOperationParameter>(parameters);
     this.returnType = returnType;
 }
Ejemplo n.º 22
0
 protected CsdlNamedStructuredType(string name, string baseTypeName, bool isAbstract, bool isOpen, IEnumerable <CsdlProperty> properties, CsdlDocumentation documentation, CsdlLocation location)
     : base(properties, documentation, location)
 {
     this.isAbstract   = isAbstract;
     this.isOpen       = isOpen;
     this.name         = name;
     this.baseTypeName = baseTypeName;
 }
Ejemplo n.º 23
0
 public CsdlAbstractNavigationSource(string name, IEnumerable <CsdlNavigationPropertyBinding> navigationPropertyBindings, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.navigationPropertyBindings = new List <CsdlNavigationPropertyBinding>(navigationPropertyBindings);
 }
        public CsdlEntityType(string name, string baseTypeName, bool isAbstract, bool isOpen, bool hasStream, CsdlKey key, IEnumerable <CsdlProperty> properties, IEnumerable <CsdlNavigationProperty> navigationProperties, CsdlDocumentation documentation, CsdlLocation location)
            : base(name, baseTypeName, isAbstract, isOpen, properties, documentation, location)
        {
            this.key       = key;
            this.hasStream = hasStream;

            this.navigationProperties = new List <CsdlNavigationProperty>(navigationProperties);
        }
 public CsdlComplexType(string name, string baseTypeName, bool isAbstract, bool isOpen, IEnumerable <CsdlProperty> properties, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, baseTypeName, isAbstract, isOpen, properties, documentation, location)
 {
 }
Ejemplo n.º 26
0
 public CsdlComplexType(string name, string baseTypeName, bool isAbstract, bool isOpen, IEnumerable<CsdlProperty> properties, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, baseTypeName, isAbstract, isOpen, properties, documentation, location)
 {
 }
Ejemplo n.º 27
0
 public CsdlEntitySet(string name, string elementType, IEnumerable <CsdlNavigationPropertyBinding> navigationPropertyBindings, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, navigationPropertyBindings, documentation, location)
 {
     this.elementType = elementType;
 }
 public CsdlAbstractNavigationSource(string name, IEnumerable<CsdlNavigationPropertyBinding> navigationPropertyBindings, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.navigationPropertyBindings = new List<CsdlNavigationPropertyBinding>(navigationPropertyBindings);
 }
 public CsdlEntityContainer(string name, string extends, IEnumerable <CsdlEntitySet> entitySets, IEnumerable <CsdlSingleton> singletons, IEnumerable <CsdlOperationImport> operationImports, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.extends          = extends;
     this.entitySets       = new List <CsdlEntitySet>(entitySets);
     this.singletons       = new List <CsdlSingleton>(singletons);
     this.operationImports = new List <CsdlOperationImport>(operationImports);
 }
 public CsdlNavigationProperty(string name, string type, bool?nullable, string partner, bool containsTarget, CsdlOnDelete onDelete, IEnumerable <CsdlReferentialConstraint> referentialConstraints, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.type                   = type;
     this.nullable               = nullable;
     this.partnerPath            = partner == null ? null : new EdmPathExpression(partner);
     this.containsTarget         = containsTarget;
     this.onDelete               = onDelete;
     this.referentialConstraints = referentialConstraints;
 }
Ejemplo n.º 31
0
 protected CsdlStructuredType(IEnumerable<CsdlProperty> properties, CsdlDocumentation documentation, CsdlLocation location)
     : base(documentation, location)
 {
     this.properties = new List<CsdlProperty>(properties);
 }
Ejemplo n.º 32
0
 public CsdlSingleton(string name, string type, IEnumerable<CsdlNavigationPropertyBinding> navigationPropertyBindings, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, navigationPropertyBindings, documentation, location)
 {
     this.type = type;
 }
Ejemplo n.º 33
0
 public CsdlEnumType(string name, string underlyingTypeName, bool isFlags, IEnumerable <CsdlEnumMember> members, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.underlyingTypeName = underlyingTypeName;
     this.isFlags            = isFlags;
     this.members            = new List <CsdlEnumMember>(members);
 }
Ejemplo n.º 34
0
 protected CsdlStructuredType(IEnumerable <CsdlProperty> structuralProperties, IEnumerable <CsdlNavigationProperty> navigationProperties, CsdlDocumentation documentation, CsdlLocation location)
     : base(documentation, location)
 {
     this.structuralProperties = new List <CsdlProperty>(structuralProperties);
     this.navigationProperties = new List <CsdlNavigationProperty>(navigationProperties);
 }
Ejemplo n.º 35
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;
        }
Ejemplo n.º 36
0
 public CsdlEntitySet(string name, string elementType, IEnumerable<CsdlNavigationPropertyBinding> navigationPropertyBindings, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, navigationPropertyBindings, documentation, location)
 {
     this.elementType = elementType;
 }
Ejemplo n.º 37
0
 protected CsdlFunctionBase(string name, IEnumerable<CsdlOperationParameter> parameters, CsdlTypeReference returnType, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, documentation, location)
 {
     this.parameters = new List<CsdlOperationParameter>(parameters);
     this.returnType = returnType;
 }
Ejemplo n.º 38
0
 public CsdlEntitySet(string name, string elementType, IEnumerable <CsdlNavigationPropertyBinding> navigationPropertyBindings, CsdlDocumentation documentation, CsdlLocation location, bool includeInServiceDocument)
     : base(name, navigationPropertyBindings, documentation, location)
 {
     this.elementType = elementType;
     this.IncludeInServiceDocument = includeInServiceDocument;
 }
Ejemplo n.º 39
0
 public CsdlSingleton(string name, string type, IEnumerable <CsdlNavigationPropertyBinding> navigationPropertyBindings, CsdlDocumentation documentation, CsdlLocation location)
     : base(name, navigationPropertyBindings, documentation, location)
 {
     this.type = type;
 }
Ejemplo n.º 40
0
 protected CsdlStructuredType(IEnumerable <CsdlProperty> properties, CsdlDocumentation documentation, CsdlLocation location)
     : base(documentation, location)
 {
     this.properties = new List <CsdlProperty>(properties);
 }
 public CsdlReferentialConstraintRole(string role, IEnumerable <CsdlPropertyReference> properties, CsdlDocumentation documentation, CsdlLocation location)
     : base(documentation, location)
 {
     this.role       = role;
     this.properties = new List <CsdlPropertyReference>(properties);
 }
 public CsdlReferentialConstraintRole(string role, IEnumerable<CsdlPropertyReference> properties, CsdlDocumentation documentation, CsdlLocation location)
     : base(documentation, location)
 {
     this.role = role;
     this.properties = new List<CsdlPropertyReference>(properties);
 }