public static ArchiveFactory FromBaseObject(BaseObject baseObj) { if (baseObj == null || baseObj.NativeObject == IntPtr.Zero) { return(null); } ArchiveFactory obj = baseObj as ArchiveFactory; if (object.Equals(obj, null)) { obj = new ArchiveFactory(CreatedWhenConstruct.CWC_NotToCreate); obj.BindNativeObject(baseObj.NativeObject, "CArchiveFactory"); obj.IncreaseCast(); } return(obj); }