Example #1
0
        /// <summary>
        /// Loads metadata and mapping information from the given path into an <see cref="Edmx"/> instance.
        /// </summary>
        /// <param name="edmx">The <see cref="Edmx"/> instance in which to load metadata from the given path.</param>
        /// <param name="splitPath">An non-delimited, i.e. split, path from which to load metadata.</param>
        /// <returns>An edmx instance loaded with metadata from the given <paramref name="splitPath"/>.</returns>
        private static Edmx Load(Edmx edmx, string splitPath)
        {
            if (splitPath.StartsWith(ResourceSchemeString))
            {
                return(LoadFromEmbeddedResource(edmx, splitPath));
            }

            if (MapToMetadataFileType(splitPath) == MetadataFileType.ConceptualModel)
            {
                edmx.Runtimes.First().ConceptualModels.ConceptualSchema = ConceptualSchema.Load(splitPath);
                return(edmx);
            }
            if (MapToMetadataFileType(splitPath) == MetadataFileType.StorageModel)
            {
                edmx.Runtimes.First().StorageModels.StorageSchema = StorageSchema.Load(splitPath);
                return(edmx);
            }
            if (MapToMetadataFileType(splitPath) == MetadataFileType.Mapping)
            {
                edmx.Runtimes.First().Mappings.Mapping = Mapping.Load(splitPath);
                return(edmx);
            }
            if (MapToMetadataFileType(splitPath) == MetadataFileType.Edmx)
            {
                return(XTypedServices.Load <Edmx, TEdmx>(splitPath, LinqToXsdTypeManager.Instance));
            }
            throw new ArgumentException(String.Format("The path argument '{0}' must represent a path to an edmx, csdl, ssdl or msl file.", splitPath));
        }
Example #2
0
 public static Mapping Load(Stream xmlStream)
 {
     using (xmlStream)
     {
         return(XTypedServices.Load <Mapping, TMapping>(xmlStream, LinqToXsdTypeManager.Instance));
     }
 }
Example #3
0
 public static StorageSchema Load(Stream xmlStream)
 {
     using (xmlStream)
     {
         return(XTypedServices.Load <StorageSchema, TSchema>(xmlStream, LinqToXsdTypeManager.Instance));
     }
 }
Example #4
0
 public static Edmx Load(Stream xmlStream)
 {
     using (xmlStream)
     {
         return(XTypedServices.Load <Edmx, TEdmx>(xmlStream, LinqToXsdTypeManager.Instance));
     }
 }
Example #5
0
        /// <summary>
        /// Loads a new <see cref="schema"/> from an existing <see cref="System.IO.FileInfo"/>.
        /// <para>The given <see cref="System.IO.FileInfo"/> is saved in the <see cref="FileInfo"/> property.</para>
        /// </summary>
        /// <param name="fileInfo"></param>
        /// <returns></returns>
        public static schema Load(FileInfo fileInfo)
        {
            var schema = XTypedServices.Load <schema>(fileInfo.FullName);

            schema.FileInfo = fileInfo;

            return(schema);
        }
 public static siteMap Load(string xmlFile)
 {
     return(XTypedServices.Load <siteMap, siteMapType>(xmlFile, LinqToXsdTypeManager.Instance));
 }
 public static siteMap Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <siteMap, siteMapType>(xmlFile, LinqToXsdTypeManager.Instance));
 }
Example #8
0
 public static NewDataSet Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <NewDataSet>(xmlFile));
 }
Example #9
0
 public static request Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <request>(xmlFile));
 }
Example #10
0
 public static StorageSchema Load(string xmlFile)
 {
     return(XTypedServices.Load <StorageSchema, TSchema>(xmlFile, LinqToXsdTypeManager.Instance));
 }
Example #11
0
 public static Mapping Load(string xmlFile)
 {
     return(XTypedServices.Load <Mapping, TMapping>(xmlFile, LinqToXsdTypeManager.Instance));
 }
 public static xdoc Load(string xmlFile)
 {
     return(XTypedServices.Load <xdoc>(xmlFile));
 }
Example #13
0
 public static EntityContainer Load(string xmlFile)
 {
     return(XTypedServices.Load <EntityContainer>(xmlFile));
 }
Example #14
0
 public static beans Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <beans>(xmlFile));
 }
Example #15
0
 public static response Load(string xmlFile)
 {
     return(XTypedServices.Load <response>(xmlFile));
 }
Example #16
0
 public static beans Load(string xmlFile)
 {
     return(XTypedServices.Load <beans>(xmlFile));
 }
Example #17
0
 public static Action Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <Action>(xmlFile));
 }
Example #18
0
 public static Action Load(string xmlFile)
 {
     return(XTypedServices.Load <Action>(xmlFile));
 }
Example #19
0
 public static TM_PeriodDuration Load(string xmlFile)
 {
     return(XTypedServices.Load <TM_PeriodDuration>(xmlFile));
 }
 public static xdoc Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <xdoc>(xmlFile));
 }
Example #21
0
 public static TM_PeriodDuration Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <TM_PeriodDuration>(xmlFile));
 }
Example #22
0
 public static MediaContainer Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <MediaContainer, MediaContainerType>(xmlFile, LinqToXsdTypeManager.Instance));
 }
Example #23
0
 /// <summary>Binds the model to a value by using the specified controller context and binding context.</summary>
 /// <param name="controllerContext">The controller context.</param>
 /// <param name="bindingContext">The binding context.</param>
 /// <returns>The bound value.</returns>
 public TXTypedElement BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
 {
     using (var reader = new StreamReader(controllerContext.HttpContext.Request.InputStream))
         return(XTypedServices.Load <TXTypedElement>(reader));
 }
Example #24
0
 public static guidanceItem Load(string xmlFile)
 {
     return(XTypedServices.Load <guidanceItem>(xmlFile));
 }
Example #25
0
 public static guidanceItem Load(System.IO.TextReader xmlFile)
 {
     return(XTypedServices.Load <guidanceItem>(xmlFile));
 }
Example #26
0
 public static request Load(string xmlFile)
 {
     return(XTypedServices.Load <request>(xmlFile));
 }
Example #27
0
 public static MediaContainer Load(string xmlFile)
 {
     return(XTypedServices.Load <MediaContainer, MediaContainerType>(xmlFile, LinqToXsdTypeManager.Instance));
 }
Example #28
0
 public static NewDataSet Load(string xmlFile)
 {
     return(XTypedServices.Load <NewDataSet>(xmlFile));
 }