internal bool GetManagedAddInData(bool scanManagedInterfaces) { bool flag = true; this.assemblyName = (string)null; this.clrVersion = (string)null; this.supportedInterfaces = (string)null; this.addInType = Resources.ADDIN_TYPE_MANAGED; this.assemblyPath = RegistryReader.GetInprocServerFromClsid(this.clsid, "CodeBase"); if (this.assemblyPath != null && File.Exists(this.assemblyPath)) { string[] assemblyInfo = AssemblyScanner.GetAssemblyInfo(this.assemblyPath, this.hostName, false); this.assemblyName = assemblyInfo[0]; this.clrVersion = assemblyInfo[1]; this.supportedInterfaces = !scanManagedInterfaces ? (string)null : this.GetSupportedInterfaces(assemblyInfo); } else { flag = false; this.assemblyName = (string)null; this.clrVersion = (string)null; this.supportedInterfaces = (string)null; } this.vstoRuntime = Resources.NOT_APPLICABLE; return(flag); }
internal bool GetNativeAddInData(bool scanNativeInterfaces, out bool isNativeScanCompleted) { bool flag = true; this.addInType = Resources.ADDIN_TYPE_NATIVE; this.assemblyPath = (string)null; this.assemblyName = Resources.NOT_APPLICABLE; this.clrVersion = Resources.NOT_APPLICABLE; this.vstoRuntime = Resources.NOT_APPLICABLE; this.supportedInterfaces = (string)null; isNativeScanCompleted = true; string inprocServerFromClsid = RegistryReader.GetInprocServerFromClsid(this.clsid, ""); if (inprocServerFromClsid != null) { this.assemblyPath = inprocServerFromClsid.Trim('"'); } else { flag = false; } if (scanNativeInterfaces) { if (this.assemblyPath != null && File.Exists(this.assemblyPath)) { this.supportedInterfaces = new NativeAddInScanner(this.hostName).GetSupportedInterfaces(this.clsid); if (this.supportedInterfaces == null) { isNativeScanCompleted = false; } } else { flag = false; } } return(flag); }