public static string GetVariableFromGlobals(EnvDTE.Globals globals, string name) { if (false == IsGlobalsVariableExists(globals, name)) { throw new ArgumentOutOfRangeException("Name"); } else { return(globals[name].ToString()); } }
public static void RemoveGlobalsVariable(EnvDTE.Globals globals, string name) { globals[name] = null; globals.set_VariablePersists(name, false); }
public static bool IsGlobalsVariableExists(EnvDTE.Globals globals, string name) { return(globals.get_VariableExists(name)); }
public static void SetGlobalsVariable(EnvDTE.Globals globals, string name, string value) { //Set globals property globals[name] = value; globals.set_VariablePersists(name, true); }