@@ -80,8 +80,7 @@ public void Start(string[] args)
8080 configDir = ( string ) rkOvpn . GetValue ( "autostart_config_dir" ) ,
8181 configExt = "." + ( string ) rkOvpn . GetValue ( "config_ext" ) ,
8282 logDir = ( string ) rkOvpn . GetValue ( "log_dir" ) ,
83- logAppend = append ,
84- priorityClass = GetPriorityClass ( ( string ) rkOvpn . GetValue ( "priority" ) )
83+ logAppend = append
8584 } ;
8685
8786 if ( String . IsNullOrEmpty ( config . configDir ) || configDirsConsidered . Contains ( config . configDir ) )
@@ -131,34 +130,6 @@ public void Start(string[] args)
131130 }
132131 }
133132
134- private System . Diagnostics . ProcessPriorityClass GetPriorityClass ( string priorityString )
135- {
136- if ( String . Equals ( priorityString , "IDLE_PRIORITY_CLASS" , StringComparison . InvariantCultureIgnoreCase ) )
137- {
138- return System . Diagnostics . ProcessPriorityClass . Idle ;
139- }
140- else if ( String . Equals ( priorityString , "BELOW_NORMAL_PRIORITY_CLASS" , StringComparison . InvariantCultureIgnoreCase ) )
141- {
142- return System . Diagnostics . ProcessPriorityClass . BelowNormal ;
143- }
144- else if ( String . Equals ( priorityString , "NORMAL_PRIORITY_CLASS" , StringComparison . InvariantCultureIgnoreCase ) )
145- {
146- return System . Diagnostics . ProcessPriorityClass . Normal ;
147- }
148- else if ( String . Equals ( priorityString , "ABOVE_NORMAL_PRIORITY_CLASS" , StringComparison . InvariantCultureIgnoreCase ) )
149- {
150- return System . Diagnostics . ProcessPriorityClass . AboveNormal ;
151- }
152- else if ( String . Equals ( priorityString , "HIGH_PRIORITY_CLASS" , StringComparison . InvariantCultureIgnoreCase ) )
153- {
154- return System . Diagnostics . ProcessPriorityClass . High ;
155- }
156- else
157- {
158- throw new Exception ( "Unknown priority name: " + priorityString ) ;
159- }
160- }
161-
162133 private void Log ( string message , EventLogEntryType type = EventLogEntryType . Information )
163134 {
164135 if ( _eventLog != null )
0 commit comments