@@ -53,6 +53,7 @@ protected static void AssertGetUserValueType(Type expectedType)
5353 Debug . Assert ( new [ ] {
5454 typeof ( bool ) ,
5555 typeof ( int ) ,
56+ typeof ( long ) ,
5657 typeof ( DateTime ) ,
5758 typeof ( TimeSpan ) ,
5859 typeof ( string ) ,
@@ -88,6 +89,13 @@ protected static void AssertGetUserValueType(Type expectedType)
8889 /// <param name="value">value of the setting</param>
8990 public abstract void SetUserValue ( string name , int value ) ;
9091
92+ /// <summary>
93+ /// Set a value of a user setting
94+ /// </summary>
95+ /// <param name="name">name of the setting</param>
96+ /// <param name="value">value of the setting</param>
97+ public abstract void SetUserValue ( string name , long value ) ;
98+
9199 /// <summary>
92100 /// Set a value of a user setting
93101 /// </summary>
@@ -231,6 +239,16 @@ public override void SetUserValue(string name, int value)
231239 Key . SetValue ( name , value , RegistryValueKind . DWord ) ;
232240 }
233241
242+ /// <summary>
243+ /// Set a value of a user setting
244+ /// </summary>
245+ /// <param name="name">name of the setting</param>
246+ /// <param name="value">value of the setting</param>
247+ public override void SetUserValue ( string name , long value )
248+ {
249+ Key . SetValue ( name , value , RegistryValueKind . QWord ) ;
250+ }
251+
234252 /// <summary>
235253 /// Set a value of a user setting
236254 /// </summary>
@@ -390,6 +408,9 @@ public override object GetUserValue(string name, Type expectedType)
390408 case "int" :
391409 userValue = int . Parse ( Uri . UnescapeDataString ( value [ 1 ] ) , CultureInfo . InvariantCulture ) ;
392410 break ;
411+ case "long" :
412+ userValue = long . Parse ( Uri . UnescapeDataString ( value [ 1 ] ) , CultureInfo . InvariantCulture ) ;
413+ break ;
393414 case "DateTime" :
394415 userValue = DateTime . FromBinary ( long . Parse ( Uri . UnescapeDataString ( value [ 1 ] ) , CultureInfo . InvariantCulture ) ) ;
395416 break ;
@@ -440,6 +461,16 @@ public override void SetUserValue(string name, int value)
440461 NativeMethods . WritePrivateProfileString ( Section , name , "int:" + Uri . EscapeDataString ( value . ToString ( CultureInfo . InvariantCulture ) ) , FilePath ) ;
441462 }
442463
464+ /// <summary>
465+ /// Set a value of a user setting
466+ /// </summary>
467+ /// <param name="name">name of the setting</param>
468+ /// <param name="value">value of the setting</param>
469+ public override void SetUserValue ( string name , long value )
470+ {
471+ NativeMethods . WritePrivateProfileString ( Section , name , "long:" + Uri . EscapeDataString ( value . ToString ( CultureInfo . InvariantCulture ) ) , FilePath ) ;
472+ }
473+
443474 /// <summary>
444475 /// Set a value of a user setting
445476 /// </summary>
0 commit comments