Ejemplo n.º 1
0
        protected WfActivityBase(SerializationInfo info, StreamingContext context)
        {
            this._ID = info.GetString("ID");

            if (WorkflowSettings.GetConfig().IsSerializeDesc)
            {
                this._Descriptor = (IWfActivityDescriptor)info.GetValue("Descriptor", typeof(IWfActivityDescriptor));
            }

            this._ProcessDescKey  = info.GetString("ProcessDescKey");
            this._ActivityDescKey = info.GetString("ActivityDescKey");
            this._FromTransition  = (IWfTransition)info.GetValue("FromTransition", typeof(IWfTransition));
            this._ToTransition    = (IWfTransition)info.GetValue("ToTransition", typeof(IWfTransition));
            this._Context         = (WfActivityContext)info.GetValue("Context", typeof(WfActivityContext));
            this._Status          = (WfActivityStatus)info.GetValue("Status", typeof(WfActivityStatus));

            this._Process   = (IWfProcess)info.GetValue("Process", typeof(IWfProcess));
            this._IsAborted = info.GetBoolean("IsAborted");
            this._StartTime = info.GetDateTime("StartTime");
            this._EndTime   = info.GetDateTime("EndTime");

            this._Assignees = (WfAssigneeCollection)info.GetValue("Assignees", typeof(WfAssigneeCollection));

            this._Operator    = (IUser)info.GetValue("Operator", typeof(IUser));
            this._LoadingType = (DataLoadingType)info.GetValue("LoadingType", typeof(DataLoadingType));
        }
Ejemplo n.º 2
0
 private void CopyCollection(WfAssigneeCollection dest, WfAssigneeCollection source)
 {
     foreach (IUser user in source)
     {
         dest.Add(user);
     }
 }
Ejemplo n.º 3
0
 public void CopyFrom(WfAssigneeCollection source)
 {
     if (source != null)
     {
         this.RWLock.AcquireWriterLock(lockTimeout);
         try
         {
             this.Clear();
             CopyCollection(this, source);
         }
         finally
         {
             this.RWLock.ReleaseWriterLock();
         }
     }
 }