private IEnumerable <IEdmEntityContainerElement> ComputeElements()
        {
            List <IEdmEntityContainerElement> edmEntityContainerElements = new List <IEdmEntityContainerElement>();
            CsdlSemanticsEntityContainer      extends = this.Extends as CsdlSemanticsEntityContainer;

            if (extends != null)
            {
                foreach (CsdlEntitySet entitySet in extends.entityContainer.EntitySets)
                {
                    CsdlSemanticsEntitySet csdlSemanticsEntitySet = new CsdlSemanticsEntitySet(this, entitySet);
                    edmEntityContainerElements.Add(csdlSemanticsEntitySet);
                }
                foreach (CsdlFunctionImport functionImport in extends.entityContainer.FunctionImports)
                {
                    CsdlSemanticsFunctionImport csdlSemanticsFunctionImport = new CsdlSemanticsFunctionImport(this, functionImport);
                    edmEntityContainerElements.Add(csdlSemanticsFunctionImport);
                }
            }
            foreach (CsdlEntitySet csdlEntitySet in this.entityContainer.EntitySets)
            {
                CsdlSemanticsEntitySet csdlSemanticsEntitySet1 = new CsdlSemanticsEntitySet(this, csdlEntitySet);
                edmEntityContainerElements.Add(csdlSemanticsEntitySet1);
            }
            foreach (CsdlFunctionImport csdlFunctionImport in this.entityContainer.FunctionImports)
            {
                CsdlSemanticsFunctionImport csdlSemanticsFunctionImport1 = new CsdlSemanticsFunctionImport(this, csdlFunctionImport);
                edmEntityContainerElements.Add(csdlSemanticsFunctionImport1);
            }
            return(edmEntityContainerElements);
        }
Ejemplo n.º 2
0
        private IEnumerable <IEdmEntityContainerElement> ComputeElements()
        {
            List <IEdmEntityContainerElement> elements = new List <IEdmEntityContainerElement>();

            // Extends is either a CsdlSemanticsEntityContainer or BadEntityContainer.
            CsdlSemanticsEntityContainer csdlEntityContainer = this.Extends as CsdlSemanticsEntityContainer;

            if (csdlEntityContainer != null)
            {
                foreach (CsdlEntitySet entitySet in csdlEntityContainer.entityContainer.EntitySets)
                {
                    CsdlSemanticsEntitySet semanticsSet = new CsdlSemanticsEntitySet(this, entitySet);
                    elements.Add(semanticsSet);
                }

                foreach (CsdlFunctionImport functionImport in csdlEntityContainer.entityContainer.FunctionImports)
                {
                    CsdlSemanticsFunctionImport semanticsFunction = new CsdlSemanticsFunctionImport(this, functionImport);
                    elements.Add(semanticsFunction);
                }
            }

            foreach (CsdlEntitySet entitySet in this.entityContainer.EntitySets)
            {
                CsdlSemanticsEntitySet semanticsSet = new CsdlSemanticsEntitySet(this, entitySet);
                elements.Add(semanticsSet);
            }

            foreach (CsdlFunctionImport functionImport in this.entityContainer.FunctionImports)
            {
                CsdlSemanticsFunctionImport semanticsFunction = new CsdlSemanticsFunctionImport(this, functionImport);
                elements.Add(semanticsFunction);
            }

            return(elements);
        }
Ejemplo n.º 3
0
		private IEnumerable<IEdmEntityContainerElement> ComputeElements()
		{
			List<IEdmEntityContainerElement> edmEntityContainerElements = new List<IEdmEntityContainerElement>();
			CsdlSemanticsEntityContainer extends = this.Extends as CsdlSemanticsEntityContainer;
			if (extends != null)
			{
				foreach (CsdlEntitySet entitySet in extends.entityContainer.EntitySets)
				{
					CsdlSemanticsEntitySet csdlSemanticsEntitySet = new CsdlSemanticsEntitySet(this, entitySet);
					edmEntityContainerElements.Add(csdlSemanticsEntitySet);
				}
				foreach (CsdlFunctionImport functionImport in extends.entityContainer.FunctionImports)
				{
					CsdlSemanticsFunctionImport csdlSemanticsFunctionImport = new CsdlSemanticsFunctionImport(this, functionImport);
					edmEntityContainerElements.Add(csdlSemanticsFunctionImport);
				}
			}
			foreach (CsdlEntitySet csdlEntitySet in this.entityContainer.EntitySets)
			{
				CsdlSemanticsEntitySet csdlSemanticsEntitySet1 = new CsdlSemanticsEntitySet(this, csdlEntitySet);
				edmEntityContainerElements.Add(csdlSemanticsEntitySet1);
			}
			foreach (CsdlFunctionImport csdlFunctionImport in this.entityContainer.FunctionImports)
			{
				CsdlSemanticsFunctionImport csdlSemanticsFunctionImport1 = new CsdlSemanticsFunctionImport(this, csdlFunctionImport);
				edmEntityContainerElements.Add(csdlSemanticsFunctionImport1);
			}
			return edmEntityContainerElements;
		}
        private IEnumerable<IEdmEntityContainerElement> ComputeElements()
        {
            List<IEdmEntityContainerElement> elements = new List<IEdmEntityContainerElement>();

            // Extends is either a CsdlSemanticsEntityContainer or BadEntityContainer.
            CsdlSemanticsEntityContainer csdlEntityContainer = this.Extends as CsdlSemanticsEntityContainer;
            if (csdlEntityContainer != null)
            {
                foreach (CsdlEntitySet entitySet in csdlEntityContainer.entityContainer.EntitySets)
                {
                    CsdlSemanticsEntitySet semanticsSet = new CsdlSemanticsEntitySet(this, entitySet);
                    elements.Add(semanticsSet);
                }

                foreach (CsdlFunctionImport functionImport in csdlEntityContainer.entityContainer.FunctionImports)
                {
                    CsdlSemanticsFunctionImport semanticsFunction = new CsdlSemanticsFunctionImport(this, functionImport);
                    elements.Add(semanticsFunction);
                }
            }

            foreach (CsdlEntitySet entitySet in this.entityContainer.EntitySets)
            {
                CsdlSemanticsEntitySet semanticsSet = new CsdlSemanticsEntitySet(this, entitySet);
                elements.Add(semanticsSet);
            }

            foreach (CsdlFunctionImport functionImport in this.entityContainer.FunctionImports)
            {
                CsdlSemanticsFunctionImport semanticsFunction = new CsdlSemanticsFunctionImport(this, functionImport);
                elements.Add(semanticsFunction);
            }

            return elements;
        }