/// <exclude /> public static XDocument GenerateUiControlSchema(IFormChannelIdentifier channelIdentifier, XNamespace controlNamespace) { Dictionary <XNamespace, XDocument> schemas = new Dictionary <XNamespace, XDocument>(); ElementInformationExtractor worker = new ElementInformationExtractor(ConfigurationServices.FileConfigurationSourcePath); var elementDescriptors = from descriptor in worker.GetUiControlDescriptors() where descriptor.ChannelName == channelIdentifier.ChannelName && descriptor.NamespaceName == controlNamespace select descriptor; return(worker.GetXsd(elementDescriptors, controlNamespace)); }
/// <exclude /> public static IEnumerable <SchemaInfo> GenerateAllDynamicSchemas() { List <SchemaInfo> generatedSchemas = new List <SchemaInfo>(); ElementInformationExtractor worker = new ElementInformationExtractor(ConfigurationServices.FileConfigurationSourcePath); var channels = from c in worker.GetUiControlDescriptors() group c by c.ChannelName into g select g; foreach (var channel in channels) { var xmlnss = from c in channel group c by c.NamespaceName into g select g; foreach (var xmlns in xmlnss) { XDocument schema = worker.GetXsd(xmlns, xmlns.Key); generatedSchemas.Add(new SchemaInfo(new ChannelIdentifier(channel.Key), xmlns.Key, schema)); } } var namespaceBasedFunctionLookup = from c in worker.GetFunctionDescriptors() group c by c.NamespaceName into g select g; foreach (var xmlns in namespaceBasedFunctionLookup) { XDocument schema = worker.GetXsd(xmlns, xmlns.Key); generatedSchemas.Add(new SchemaInfo(xmlns.Key, schema)); } return(generatedSchemas); }
/// <exclude /> public static IEnumerable<SchemaInfo> GenerateAllDynamicSchemas() { List<SchemaInfo> generatedSchemas = new List<SchemaInfo>(); ElementInformationExtractor worker = new ElementInformationExtractor(ConfigurationServices.FileConfigurationSourcePath); var channels = from c in worker.GetUiControlDescriptors() group c by c.ChannelName into g select g; foreach (var channel in channels) { var xmlnss = from c in channel group c by c.NamespaceName into g select g; foreach (var xmlns in xmlnss) { XDocument schema = worker.GetXsd( xmlns, xmlns.Key); generatedSchemas.Add(new SchemaInfo(new ChannelIdentifier(channel.Key), xmlns.Key, schema)); } } var namespaceBasedFunctionLookup = from c in worker.GetFunctionDescriptors() group c by c.NamespaceName into g select g; foreach (var xmlns in namespaceBasedFunctionLookup) { XDocument schema = worker.GetXsd(xmlns, xmlns.Key); generatedSchemas.Add(new SchemaInfo(xmlns.Key, schema)); } return generatedSchemas; }
/// <exclude /> public static XDocument GenerateUiControlSchema(IFormChannelIdentifier channelIdentifier, XNamespace controlNamespace) { Dictionary<XNamespace, XDocument> schemas = new Dictionary<XNamespace, XDocument>(); ElementInformationExtractor worker = new ElementInformationExtractor(ConfigurationServices.FileConfigurationSourcePath); var elementDescriptors = from descriptor in worker.GetUiControlDescriptors() where descriptor.ChannelName == channelIdentifier.ChannelName && descriptor.NamespaceName == controlNamespace select descriptor; return worker.GetXsd(elementDescriptors, controlNamespace); }