/// <summary> /// Creates a copy of the enum in the designated dictionary. The namespace structure is copied over. /// The new enum is set to update this one. /// </summary> /// <param name="dictionary">The target dictionary of the copy</param> /// <returns></returns> public Enum CreateEnumUpdate(Dictionary dictionary) { Enum retVal = (Enum)GetTopLevelEnum().Duplicate(); retVal.SetUpdateInformation(GetTopLevelEnum()); retVal.ClearAllRequirements(); String[] names = GetTopLevelEnum().FullName.Split('.'); names = names.Take(names.Count() - 1).ToArray(); NameSpace nameSpace = dictionary.GetNameSpaceUpdate(names, Dictionary); if (nameSpace != null) { nameSpace.appendEnumerations(retVal); } return(retVal); }