public oprConnectionDecoratorFactory Persist(DirectoryInfo oprPath) { oprConnectionDecoratorFactory factory = new oprConnectionDecoratorFactory(); factory.type = _type.FullName; if (_is3rdParty) { factory.id = string.Empty; factory.assembly = oprPath == null ? _assembly.FullName: Utils.RelativePath(oprPath, _assembly.FullName); } else { factory.id = _id; factory.assembly = null; } return(factory); }
public void Initialise(oprConnectionDecoratorFactory opr, IBaseLinkableComponent source, DirectoryInfo oprPath) { if (opr.id != string.Empty || opr.assembly == "SourceComponent") { InitialiseAsNative(opr.id, source); } else // 3rd party { FileInfo assembly; if (!Path.IsPathRooted(opr.assembly)) { assembly = new FileInfo( Path.Combine(oprPath.FullName, opr.assembly)); } else { assembly = new FileInfo(opr.assembly); } InitialiseAs3rdParty(assembly, opr.type); } }