コード例 #1
0
        public override void ServerToClient(WfActivityDescriptor server, ref WfClientActivityDescriptor client)
        {
            server.NullCheck("server");

            if (client == null)
            {
                client = new WfClientActivityDescriptor(server.ActivityType.ToClientActivityType());
            }
            else
            {
                client.ActivityType = server.ActivityType.ToClientActivityType();
            }

            base.ServerToClient(server, ref client);

            WfClientConditionDescriptor clientCondition = client.Condition;

            WfClientConditionDescriptorConverter.Instance.ServerToClient(server.Condition, ref clientCondition);
            client.Condition = clientCondition;

            WfClientResourceDescriptorCollectionConverter.Instance.ServerToClient(server.Resources, client.Resources);
            WfClientResourceDescriptorCollectionConverter.Instance.ServerToClient(server.EnterEventReceivers, client.EnterEventReceivers);
            WfClientResourceDescriptorCollectionConverter.Instance.ServerToClient(server.LeaveEventReceivers, client.LeaveEventReceivers);
            WfClientVariableDescriptorCollectionConverter.Instance.ServerToClient(server.Variables, client.Variables);
            WfClientBranchProcessTemplateDescriptorCollectionConverter.Instance.ServerToClient(server.BranchProcessTemplates, client.BranchProcessTemplates);
            WfClientRelativeLinkDescriptorCollectionConverter.Instance.ServerToClient(server.RelativeLinks, client.RelativeLinks);
        }
コード例 #2
0
        public void ServerToClient(WfConditionDescriptor server, ref WfClientConditionDescriptor client)
        {
            server.NullCheck("server");

            if (client == null)
                client = new WfClientConditionDescriptor();

            client.Expression = server.Expression;
        }
コード例 #3
0
        public void ClientToServer(WfClientConditionDescriptor client, ref WfConditionDescriptor server)
        {
            client.NullCheck("client");

            if (server == null)
                server = new WfConditionDescriptor(null);

            server.Expression = client.Expression;
        }
コード例 #4
0
 public static void AreSame(this WfClientConditionDescriptor expected, WfClientConditionDescriptor actual)
 {
     if (expected != null && actual != null)
     {
         AssertStringEqual(expected.Expression, actual.Expression);
     }
     else
     {
         Assert.AreEqual(expected, actual);
     }
 }
コード例 #5
0
        public void ServerToClient(WfConditionDescriptor server, ref WfClientConditionDescriptor client)
        {
            server.NullCheck("server");

            if (client == null)
            {
                client = new WfClientConditionDescriptor();
            }

            client.Expression = server.Expression;
        }
コード例 #6
0
        public void ClientToServer(WfClientConditionDescriptor client, ref WfConditionDescriptor server)
        {
            client.NullCheck("client");

            if (server == null)
            {
                server = new WfConditionDescriptor(null);
            }

            server.Expression = client.Expression;
        }
コード例 #7
0
        public override void ServerToClient(WfBranchProcessTemplateDescriptor server, ref WfClientBranchProcessTemplateDescriptor client)
        {
            server.NullCheck("server");

            if (client == null)
            {
                client = new WfClientBranchProcessTemplateDescriptor(server.Key);
            }

            base.ServerToClient(server, ref client);

            WfClientConditionDescriptor clientCondition = client.Condition;

            WfClientConditionDescriptorConverter.Instance.ServerToClient(server.Condition, ref clientCondition);
            client.Condition = clientCondition;

            WfClientResourceDescriptorCollectionConverter.Instance.ServerToClient(server.Resources, client.Resources);
            WfClientResourceDescriptorCollectionConverter.Instance.ServerToClient(server.CancelSubProcessNotifier, client.CancelSubProcessNotifier);
            WfClientRelativeLinkDescriptorCollectionConverter.Instance.ServerToClient(server.RelativeLinks, client.RelativeLinks);
        }
コード例 #8
0
        public override void ServerToClient(WfTransitionDescriptor server, ref WfClientTransitionDescriptor client)
        {
            server.NullCheck("server");

            if (client == null)
            {
                client = new WfClientTransitionDescriptor(server.Key);
            }

            base.ServerToClient(server, ref client);

            client.ToActivityKey   = server.ToActivityKey;
            client.FromActivityKey = server.FromActivityKey;

            WfClientConditionDescriptor clientCondition = client.Condition;

            WfClientConditionDescriptorConverter.Instance.ServerToClient(server.Condition, ref clientCondition);
            client.Condition = clientCondition;

            WfClientVariableDescriptorCollectionConverter.Instance.ServerToClient(server.Variables, client.Variables);
        }
コード例 #9
0
 public static void AreSame(this WfClientConditionDescriptor c, WfConditionDescriptor s)
 {
     Assert.IsNotNull(c);
     Assert.IsNotNull(s);
     Assert.AreEqual(c.Expression, s.Expression);
 }
コード例 #10
0
 public static void AreSame(this WfClientConditionDescriptor expected, WfClientConditionDescriptor actual)
 {
     if (expected != null && actual != null)
         AssertStringEqual(expected.Expression, actual.Expression);
     else
         Assert.AreEqual(expected, actual);
 }