Changeset 4762
- Timestamp:
- 11/10/10 13:39:14 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Operators.Programmable/3.3/ProgrammableOperator.cs
r4722 r4762 75 75 76 76 public readonly Dictionary<string, List<Assembly>> Plugins; 77 78 77 protected Dictionary<Assembly, bool> Assemblies; 79 78 … … 160 159 161 160 #region Construction & Initialization 161 162 162 [StorableConstructor] 163 protected ProgrammableOperator(bool deserializing) : base(deserializing) { } 164 [StorableHook(HookType.AfterDeserialization)] 165 private void AfterDeserialization() { 166 RegisterEvents(); 163 protected ProgrammableOperator(bool deserializing) 164 : base(deserializing) { 165 ProgrammableOperator.StaticInitialize(); 166 Assemblies = defaultAssemblyDict.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 167 Plugins = defaultPluginDict.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.ToList()); 167 168 } 168 169 … … 172 173 executeMethod = original.executeMethod; 173 174 Assemblies = original.Assemblies.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 174 namespaces = original.namespaces; 175 Plugins = original.Plugins.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); 176 namespaces = new HashSet<string>(original.namespaces); 175 177 CompilationUnitCode = original.CompilationUnitCode; 176 CompileErrors = original.CompileErrors;178 CompileErrors = new CompilerErrorCollection(original.CompileErrors); 177 179 RegisterEvents(); 178 }179 public override IDeepCloneable Clone(Cloner cloner) {180 return new ProgrammableOperator(this, cloner);181 180 } 182 181 … … 191 190 } 192 191 192 [StorableHook(HookType.AfterDeserialization)] 193 private void AfterDeserialization() { 194 RegisterEvents(); 195 } 196 197 public override IDeepCloneable Clone(Cloner cloner) { 198 return new ProgrammableOperator(this, cloner); 199 } 193 200 194 201 private void RegisterEvents() { … … 261 268 assemblies.Add(a, false); 262 269 } 263 } 264 catch (NotSupportedException) { 270 } catch (NotSupportedException) { 265 271 // NotSupportedException is thrown while accessing 266 272 // the Location property of the anonymously hosted
Note: See TracChangeset
for help on using the changeset viewer.