Ejemplo n.º 1
0
 public void RegisterClassDelegate(ushort key, ClassDelegate sd, ClassDelegate rd)
 {
     ClassDelegate[] delegateArray = new ClassDelegate[] { sd, rd };
     if (!this._classDlgsDict.ContainsKey(key))
     {
         this._classDlgsDict.Add(key, delegateArray);
     }
 }
 protected internal virtual IActivityBehavior CreateMuleActivityBehavior(TaskWithFieldExtensions task, IList <FieldExtension> fieldExtensions)
 {
     try
     {
         Type theClass = Type.GetType("Sys.Workflow.Mule.MuleSendActivitiBehavior");
         IList <FieldDeclaration> fieldDeclarations = CreateFieldDeclarations(fieldExtensions);
         return((IActivityBehavior)ClassDelegate.DefaultInstantiateDelegate(theClass, fieldDeclarations));
     }
     catch (Exception e)
     {
         throw new ActivitiException("Could not find Sys.Workflow.Mule.MuleSendActivitiBehavior: ", e);
     }
 }
        protected internal virtual IActivityBehavior CreateCamelActivityBehavior(TaskWithFieldExtensions task, IList <FieldExtension> fieldExtensions)
        {
            try
            {
                Type           theClass          = null;
                FieldExtension behaviorExtension = null;
                foreach (FieldExtension fieldExtension in fieldExtensions)
                {
                    if ("camelBehaviorClass".Equals(fieldExtension.FieldName) && !string.IsNullOrWhiteSpace(fieldExtension.StringValue))
                    {
                        theClass          = Type.GetType(fieldExtension.StringValue);
                        behaviorExtension = fieldExtension;
                        break;
                    }
                }

                if (behaviorExtension != null)
                {
                    fieldExtensions.Remove(behaviorExtension);
                }

                if (theClass == null)
                {
                    // Default Camel behavior class
                    theClass = Type.GetType("Sys.Workflow.Camel.Impl.CamelBehaviorDefaultImpl");
                }

                IList <FieldDeclaration> fieldDeclarations = CreateFieldDeclarations(fieldExtensions);
                AddExceptionMapAsFieldDeclaration(fieldDeclarations, task.MapExceptions);
                return((IActivityBehavior)ClassDelegate.DefaultInstantiateDelegate(theClass, fieldDeclarations));
            }
            catch (Exception e)
            {
                throw new ActivitiException("Could not find Sys.Workflow.Camel.CamelBehavior: ", e);
            }
        }
        public virtual ShellActivityBehavior CreateShellActivityBehavior(ServiceTask serviceTask)
        {
            IList <FieldDeclaration> fieldDeclarations = CreateFieldDeclarations(serviceTask.FieldExtensions);

            return((ShellActivityBehavior)ClassDelegate.DefaultInstantiateDelegate(typeof(ShellActivityBehavior), fieldDeclarations));
        }
        protected internal virtual MailActivityBehavior CreateMailActivityBehavior(string taskId, IList <FieldExtension> fields)
        {
            IList <FieldDeclaration> fieldDeclarations = CreateFieldDeclarations(fields);

            return((MailActivityBehavior)ClassDelegate.DefaultInstantiateDelegate(typeof(MailActivityBehavior), fieldDeclarations));
        }
Ejemplo n.º 6
0
            public static int Main_old(String[] args)
            {
                int retval = 0x0F;

                Delegate_TestClass_delegate60 c = new Delegate_TestClass_delegate60();
                Delegate_TestClass_delegate60_Del nsd = new Delegate_TestClass_delegate60_Del(c.DelegatedMethod);
                if (nsd is System.Delegate)
                    retval -= 0x01;
                if (nsd is System.MulticastDelegate)
                    retval -= 0x02;
                ClassDelegate cd = new ClassDelegate(c.DelegatedMethod);
                if (cd is System.Delegate)
                    retval -= 0x04;
                if (cd is System.MulticastDelegate)
                    retval -= 0x08;
                if (0 == retval) Log.Comment("PASS");
                else
                {
                    Log.Comment("FAIL, 0x{0:X}");
                    Log.Comment(retval.ToString());
                }
                return retval;
            }
Ejemplo n.º 7
0
 public void setDelegate(ClassDelegate setClassDelegate)
 {
     // 위 Method를 통해 Winform에서 DataSend 객체를 생성하고
     // 실행시킴으로서 dataSend가 실질적으로 할당되고록 한다.
     dataSend = setClassDelegate;
 }