Esempio n. 1
0
        public Dictionary <string, List <Rules> > buildMap(String path, List <String> m_list, String metaname)
        {
            Workflow customObject = ManageXMLWorkflow.Deserialize(path);

            foreach (String Metafile in m_list)
            {
                String [] customMetaSplit = Metafile.Split(".");
                String    m_nameObject    = customMetaSplit[0];
                String    customInMeta    = customMetaSplit[1];
                foreach (Rules Meta in customObject.Rules)
                {
                    if (!m_dictionaryObject.ContainsKey(m_nameObject))
                    {
                        m_dictionaryObject.Add(m_nameObject, new List <Rules>());
                    }
                    if (Meta.FullName == customInMeta)
                    {
                        m_dictionaryObject[m_nameObject].Add(Meta);
                    }
                }
            }

            if (m_dictionaryObject.Count == 0)
            {
                throw new Exception("Erro não foi encontrado nenhum valor");
            }

            return(m_dictionaryObject);
        }
Esempio n. 2
0
        public override void buildCopy(String metaname, String directoryPath, String directoryTargetFilePath)
        {
            String pathDirectoryFileCustomObject = String.Concat(directoryPath, @"/", metaname, ".workflow");

            this.buildMap(pathDirectoryFileCustomObject, this.m_list, this.m_metaname);
            Workflow m_CustomObject_clean = ManageXMLWorkflow.createNewObject();

            m_CustomObject_clean.Rules = m_dictionaryObject[metaname];
            ManageXMLWorkflow.doWrite(m_CustomObject_clean, String.Concat(directoryTargetFilePath, @"/"), String.Concat(metaname, ".workflow"));
        }