public static object GetActiveDocument(object envdteInstance) { object obj = (object)null; if (envdteInstance != null) { obj = DteServices.GetEnvDteType().InvokeMember("ActiveDocument", BindingFlags.Instance | BindingFlags.Public | BindingFlags.GetProperty, (Binder)null, envdteInstance, new object[0]); } return(obj); }
public static object GetActiveDocument(object envdteInstance) { object activeDoc = null; if (envdteInstance != null) { activeDoc = DteServices.GetEnvDteType().InvokeMember("ActiveDocument", propFlag, null, envdteInstance, new Object[] { }); } return(activeDoc); }
public DteServices(IServiceProvider provider) { ServiceProvider = provider; EnvDteType = DteServices.GetEnvDteType(); EnvDteInstance = this.GetEnvDteInstance(); EnvDteActiveDocument = this.GetActiveDocument(); EnvDteActiveProjectItem = this.GetActiveProjectItem(); EnvDteContainingProject = this.GetActiveContainingProject(); EnvDteContainingProjectProperties = this.GetActiveProjectProperties(); EnvDteContainingProjectPath = this.GetActivePathAddIn(); EnvDteContainingProjectPathStr = this.GetActiveProjectFullPath(); }
public static object GetEnvDteInstance(IServiceProvider provider) { object envDte = provider.GetService(DteServices.GetEnvDteType()); return(envDte); }
public static object GetEnvDteInstance(System.IServiceProvider provider) { return(provider.GetService(DteServices.GetEnvDteType())); }