Exemplo n.º 1
0
        public IEnumerable <tProperty> GetProcessProperties(tDefinitions definition, string processId)
        {
            processId.ThrowIfNull();
            tProcess process = GetProcess(definition, processId);

            return(process.property);
        }
Exemplo n.º 2
0
 public static void SerializeDefinition(string fileName, tDefinitions definition)
 {
     using (var xmlStream = new StreamWriter(fileName, false))
     {
         var serialzer = new XmlSerializer(typeof(tDefinitions));
         serialzer.Serialize(xmlStream, definition);
     }
 }
Exemplo n.º 3
0
        public static string SerializeDefinition(tDefinitions definition)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(tDefinitions));

            using (StringWriter textWriter = new StringWriter())
            {
                serializer.Serialize(textWriter, definition);
                return(textWriter.ToString());
            }
        }
Exemplo n.º 4
0
 public bool TryGetItemDefinition(tDefinitions definition, string itemSubjectRef, out tItemDefinition item)
 {
     item = definition.Items.OfType <tItemDefinition>().FirstOrDefault(t => t.id.Equals(itemSubjectRef));
     return(item != null);
 }
Exemplo n.º 5
0
 public tItemDefinition GetItemDefinition(tDefinitions definition, string id)
 {
     return(definition.Items.OfType <tItemDefinition>().FirstOrDefault(t => t.id.Equals(id)));
 }
Exemplo n.º 6
0
 public static async Task SerializeDefinitionAsync(string fileName, tDefinitions definition)
 {
     await Task.Run(() => SerializeDefinition(fileName, definition));
 }
Exemplo n.º 7
0
 public Task SerializeAsync(string fileName, tDefinitions definition)
 {
     return(Task.Factory.StartNew(() => Serialize(fileName, definition)));
 }