Beispiel #1
0
        /// <summary>
        ///     Initializes an MetadataLoader Instance  with the
        ///     TextTransformation (T4 generated class) that is currently running
        /// </summary>
        public MetadataLoader(object textTransformation)
        {
            if(textTransformation == null)
                throw new ArgumentNullException("textTransformation");

            _textTransformation = DynamicTextTransformation.Create(textTransformation);
        }
        /// <summary>
        ///     Initializes an EntityFrameworkTemplateFileManager Instance  with the
        ///     TextTransformation (T4 generated class) that is currently running
        /// </summary>
        EntityFrameworkTemplateFileManager(object textTransformation)
        {
            if(textTransformation == null)
                throw new ArgumentNullException("textTransformation");

            _textTransformation = DynamicTextTransformation.Create(textTransformation);
            _generationEnvironment = _textTransformation.GenerationEnvironment;
        }
        /// <summary>
        ///     Initializes a new CodeGenerationTools object with the TextTransformation (T4 generated class)
        ///     that is currently running
        /// </summary>
        public CodeGenerationTools(object textTransformation)
        {
            if(textTransformation == null)
                throw new ArgumentNullException("textTransformation");

            _textTransformation = DynamicTextTransformation.Create(textTransformation);
            _code = new CSharpCodeProvider();
            _ef = new MetadataTools(_textTransformation);
            FullyQualifySystemTypes = false;
            CamelCaseFields = true;
        }
Beispiel #4
0
 public EdmItemCollectionBuilder(DynamicTextTransformation textTransformation, IEnumerable<string> referenceSchemas)
     : this(textTransformation) { _referenceSchemas.AddRange(referenceSchemas); }
Beispiel #5
0
 public EdmItemCollectionBuilder(DynamicTextTransformation textTransformation)
     : base(textTransformation, MetadataConstants.CSDL_EXTENSION, MetadataConstants.CSDL_NAMESPACE_V1, MetadataConstants.CSDL_NAMESPACE_V2, MetadataConstants.CSDL_EDMX_SECTION_NAME, MetadataConstants.CSDL_ROOT_ELEMENT_NAME) { }
Beispiel #6
0
 public StorageMappingItemCollectionBuilder(DynamicTextTransformation textTransformation, EdmItemCollection edmItemCollection, StoreItemCollection storeItemCollection)
     : base(textTransformation, MetadataConstants.MSL_EXTENSION, MetadataConstants.MSL_NAMESPACE_V1, MetadataConstants.MSL_NAMESPACE_V2, MetadataConstants.MSL_EDMX_SECTION_NAME, MetadataConstants.MSL_ROOT_ELEMENT_NAME)
 {
     _edmItemCollection = edmItemCollection;
     _storeItemCollection = storeItemCollection;
 }
Beispiel #7
0
 /// <summary>
 ///     Ctor to setup the ItemCollectionBuilder members
 /// </summary>
 protected ItemCollectionBuilder(DynamicTextTransformation textTransformation, string fileExtension, string namespaceV1, string namespaceV2, string edmxSectionName, string rootElementName)
 {
     _textTransformation = textTransformation;
     _fileExtension = fileExtension;
     _namespaceV1 = namespaceV1;
     _namespaceV2 = namespaceV2;
     _edmxSectionName = edmxSectionName;
     _rootElementName = rootElementName;
 }