/// <summary> /// Initializes a new instance of the <see cref="EdmModelBase"/> class. /// </summary> /// <param name="referencedModels">Models to which this model refers.</param> /// <param name="annotationsManager">Annotations manager for the model to use.</param> protected EdmModelBase(IEnumerable <IEdmModel> referencedModels, EdmDirectValueAnnotationsManager annotationsManager) { EdmUtil.CheckArgumentNull(referencedModels, "referencedModels"); EdmUtil.CheckArgumentNull(annotationsManager, "annotationsManager"); this.referencedModels = new List <IEdmModel>(referencedModels); this.referencedModels.Add(EdmCoreModel.Instance); this.annotationsManager = annotationsManager; }
public CsdlSemanticsModel(CsdlModel astModel, EdmDirectValueAnnotationsManager annotationsManager, IEnumerable <IEdmModel> referencedModels) : base(referencedModels, annotationsManager) { this.astModel = astModel; foreach (CsdlSchema schema in this.astModel.Schemata) { this.AddSchema(schema); } }
protected EdmModelBase(IEnumerable <IEdmModel> referencedModels, EdmDirectValueAnnotationsManager annotationsManager) { this.containersDictionary = new Dictionary <string, IEdmEntityContainer>(); this.schemaTypeDictionary = new Dictionary <string, IEdmSchemaType>(); this.valueTermDictionary = new Dictionary <string, IEdmValueTerm>(); this.functionDictionary = new Dictionary <string, object>(); EdmUtil.CheckArgumentNull <IEnumerable <IEdmModel> >(referencedModels, "referencedModels"); EdmUtil.CheckArgumentNull <EdmDirectValueAnnotationsManager>(annotationsManager, "annotationsManager"); this.referencedModels = new List <IEdmModel>(referencedModels); this.referencedModels.Add(EdmCoreModel.Instance); this.annotationsManager = annotationsManager; }
public CsdlSemanticsModel(CsdlModel astModel, EdmDirectValueAnnotationsManager annotationsManager, IEnumerable <IEdmModel> referencedModels) : base(referencedModels, annotationsManager) { this.schemata = new List <CsdlSemanticsSchema>(); this.outOfLineAnnotations = new Dictionary <string, List <CsdlSemanticsAnnotations> >(); this.wrappedAnnotations = new Dictionary <CsdlVocabularyAnnotationBase, CsdlSemanticsVocabularyAnnotation>(); this.associationDictionary = new Dictionary <string, IEdmAssociation>(); this.derivedTypeMappings = new Dictionary <string, List <IEdmStructuredType> >(); this.astModel = astModel; foreach (CsdlSchema schema in this.astModel.Schemata) { this.AddSchema(schema); } }