예제 #1
0
파일: DNManager.cs 프로젝트: rinavin/RCJS
        /// <summary>
        /// Duplicates a DNObjectsCollection entry and returns the new key
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public int DuplicateDNObjectsCollectionEntry(int sourceKey)
        {
            String[] currentTaskDNEventsNames = DNObjectsCollection.GetCurrentTaskDNEventsNames(sourceKey);
            Object   sourceObj    = DNObjectsCollection.GetDNObj(sourceKey);
            Type     sourceDNType = DNObjectsCollection.GetDNType(sourceKey);

            int key = DNObjectsCollection.CreateEntry(sourceDNType);

            DNObjectsCollection.Update(key, sourceObj);
            DNObjectEventsCollection.addEvents(sourceObj, currentTaskDNEventsNames);

            return(key);
        }
예제 #2
0
파일: DNManager.cs 프로젝트: rinavin/RCJS
        /// <summary>creates a DNObjectsCollection entry and returns the new key</summary>
        /// <param name="assemblyHashCode"></param>
        /// <param name="typeName"></param>
        /// <param name="currentTaskDNEventsNames">comma-delimited string of events that are handled for the .net variable in the task containing the variable</param>
        /// <returns></returns>
        public int CreateDNObjectsCollectionEntry(int assemblyHashCode, String typeName, String currentTaskDNEventsNames)
        {
            int  key    = 0;
            Type dnType = null;

            // get the dotnet type
            if (assemblyHashCode != 0 && typeName != null && typeName.Length != 0)
            {
                dnType = ReflectionServices.GetType(assemblyHashCode, typeName);
            }

            // create an entry into DNObjectsCollection
            key = DNObjectsCollection.CreateEntry(dnType, currentTaskDNEventsNames);

            return(key);
        }