コード例 #1
0
ファイル: WFState.cs プロジェクト: kmrgithub/KRSrcWorkflow
        public WFState(XmlNode node, WFSrc wfsrc, WFTarget wftarget, string assemblycache)
        {
            this.State = new KRSrcWorkflow.WFState(string.Empty);
            this.Target = null;
            this.Mappings = new List<WFMapping>();

            if (node == null)
                throw new Exception("Input node is null");

            XmlNode value = node.Attributes.GetNamedItem("value");
            if((value == null) || (value.Value == string.Empty))
                throw new Exception("No value attribute in node");
            this.State.Value = value.Value;

            XmlNode target = node.Attributes.GetNamedItem("target");
            if ((wftarget == null) && ((value == null) || (value.Value == string.Empty)))
                throw new Exception("No target attribute in node");

            if (target != null)
            {
                try
                {
                    wftarget = new WFTarget(target.Value, assemblycache);
                }
                catch (Exception ex)
                {
                    throw new Exception("Create WFTarget failed.", ex);
                }
                this.Target = wftarget;
            }
            foreach (XmlNode mappingnode in node.SelectNodes("mapping"))
                this.Mappings.Add(new WFMapping(mappingnode, wfsrc.AssemblyType, wftarget.AssemblyType));
        }
コード例 #2
0
        private IWFMessageQueue GetOrCreateLocalQueue(string queuename, string ip)
        {
#if DEBUG
            string fullyQualified = WFTarget.SanitizeQueue(queuename);
            if (!System.Messaging.MessageQueue.Exists(fullyQualified))
            {
                System.Messaging.MessageQueue.Create(fullyQualified);
            }
#endif
            Type genericqueuetype = typeof(IWFMessageQueueFactory <,>).MakeGenericType(new[] { typeof(System.Messaging.MessageQueue), this.AssemblyType });
            return((IWFMessageQueue)genericqueuetype.GetMethod("CreateWFMessageQueue").Invoke(null, new object[] { ip, queuename }));
        }
コード例 #3
0
ファイル: WFState.cs プロジェクト: kmrgithub/KRSrcWorkflow
        public WFState(XmlNode node, WFSrc wfsrc, WFTarget wftarget, string assemblycache)
        {
            this.State    = new KRSrcWorkflow.WFState(string.Empty);
            this.Target   = null;
            this.Mappings = new List <WFMapping>();

            if (node == null)
            {
                throw new Exception("Input node is null");
            }

            XmlNode value = node.Attributes.GetNamedItem("value");

            if ((value == null) || (value.Value == string.Empty))
            {
                throw new Exception("No value attribute in node");
            }
            this.State.Value = value.Value;

            XmlNode target = node.Attributes.GetNamedItem("target");

            if ((wftarget == null) && ((value == null) || (value.Value == string.Empty)))
            {
                throw new Exception("No target attribute in node");
            }

            if (target != null)
            {
                try
                {
                    wftarget = new WFTarget(target.Value, assemblycache);
                }
                catch (Exception ex)
                {
                    throw new Exception("Create WFTarget failed.", ex);
                }
                this.Target = wftarget;
            }
            foreach (XmlNode mappingnode in node.SelectNodes("mapping"))
            {
                this.Mappings.Add(new WFMapping(mappingnode, wfsrc.AssemblyType, wftarget.AssemblyType));
            }
        }
コード例 #4
0
ファイル: WFState.cs プロジェクト: kmrgithub/KRSrcWorkflow
 public WFState(XmlNode node, WFSrc wfsrc, WFTarget wftarget)
     : this(node, wfsrc, wftarget, string.Empty)
 {
 }
コード例 #5
0
ファイル: WFState.cs プロジェクト: kmrgithub/KRSrcWorkflow
 public WFState(XmlNode node, WFSrc wfsrc, WFTarget wftarget)
     : this(node, wfsrc, wftarget, string.Empty)
 {
 }