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