public object GetProjectConfigurationPropertyValue(string propertyName) { object obj = (object)null; if (this.EnvDteContainingProject != null) { object propertyValue1 = DteServices.GetPropertyValue("ConfigurationManager", this.EnvDteContainingProject); if (propertyValue1 == null) { return((object)null); } object propertyValue2 = DteServices.GetPropertyValue("ActiveConfiguration", propertyValue1); if (propertyValue2 == null) { return((object)null); } object propertyValue3 = DteServices.GetPropertyValue("Properties", propertyValue2); if (propertyValue3 == null) { return((object)null); } object targetObject = DteServices.InvokeMethod("Item", propertyValue3, (object)propertyName); if (targetObject == null) { return((object)null); } obj = DteServices.GetPropertyValue("Value", targetObject); } return(obj); }
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 string GetActiveDocumentPath() { string str = (string)null; object activeDocument = this.GetActiveDocument(); if (activeDocument != null) { str = (string)DteServices.GetPropertyValue("Path", activeDocument); } return(str); }
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(); }
private ProjectManagement(IServiceProvider provider) { this._Services = new DteServices(provider); }
public static object GetEnvDteInstance(IServiceProvider provider) { object envDte = provider.GetService(DteServices.GetEnvDteType()); return(envDte); }
internal static string GetProjectFolder(IServiceProvider provider) { DteServices Services = new DteServices(provider); return(Services.GetActiveProjectFullPath()); }
public static object GetEnvDteInstance(System.IServiceProvider provider) { return(provider.GetService(DteServices.GetEnvDteType())); }