SharpCifs.Config.SetProperties C# (CSharp) Method

SetProperties() public static method

Set the default properties of the static Properties used by Config.
Set the default properties of the static Properties used by Config. This permits a different Properties object/file to be used as the source of properties for use by the jCIFS library. The Properties must be set before jCIFS classes are accessed as most jCIFS classes load properties statically once. Using this method will also override properties loaded using the -Djcifs.properties= commandline parameter.
public static SetProperties ( Properties prp ) : void
prp SharpCifs.Util.Sharpen.Properties
return void
        public static void SetProperties(Properties prp)
        {
            Config._prp = new Properties(prp);
            try
            {
                Config._prp.PutAll(Runtime.GetProperties());
            }
            catch (SecurityException)
            {
                if (_log.Level > 1)
                {
                    _log.WriteLine("SecurityException: jcifs will ignore System properties");
                }
            }
        }