aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/IO/SharpCifs/Util/Sharpen/Properties.cs
diff options
context:
space:
mode:
authorJoshua M. Boniface <joshua@boniface.me>2019-01-07 00:47:06 -0500
committerGitHub <noreply@github.com>2019-01-07 00:47:06 -0500
commitc986340c02cb0b7fe06569d25a1b5d1c8375f7f6 (patch)
tree4971c970bbdb797cc5b3da2d8bae506231b173a5 /Emby.Server.Implementations/IO/SharpCifs/Util/Sharpen/Properties.cs
parent76b647e0a8eddd65dc9c4de7b887a3faf6e12bcc (diff)
parent0b804629b85498370c882f5562dfc7acd84bfd11 (diff)
Merge pull request #419 from jellyfin/dev
Master 10.0.0
Diffstat (limited to 'Emby.Server.Implementations/IO/SharpCifs/Util/Sharpen/Properties.cs')
-rw-r--r--Emby.Server.Implementations/IO/SharpCifs/Util/Sharpen/Properties.cs86
1 files changed, 0 insertions, 86 deletions
diff --git a/Emby.Server.Implementations/IO/SharpCifs/Util/Sharpen/Properties.cs b/Emby.Server.Implementations/IO/SharpCifs/Util/Sharpen/Properties.cs
deleted file mode 100644
index 3d886ea87a..0000000000
--- a/Emby.Server.Implementations/IO/SharpCifs/Util/Sharpen/Properties.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using System.IO;
-
-namespace SharpCifs.Util.Sharpen
-{
- public class Properties
- {
- protected Hashtable _properties;
-
- public Properties()
- {
- _properties = new Hashtable();
- }
-
- public Properties(Properties defaultProp): this()
- {
- PutAll(defaultProp._properties);
- }
-
- public void PutAll(Hashtable properties)
- {
- foreach (var key in properties.Keys)
- {
- //_properties.Add(key, properties[key]);
- _properties.Put(key, properties[key]);
- }
- }
-
- public void SetProperty(object key, object value)
- {
- //_properties.Add(key, value);
- _properties.Put(key, value);
- }
-
- public object GetProperty(object key)
- {
- return _properties.Keys.Contains(key) ? _properties[key] : null;
- }
-
- public object GetProperty(object key, object def)
- {
- /*if (_properties.ContainsKey(key))
- {
- return _properties[key];
- }
- return def;*/
- object value = _properties.Get(key);
-
- return value ?? def;
- }
-
- public void Load(InputStream input)
- {
- StreamReader sr = new StreamReader(input);
- while (!sr.EndOfStream)
- {
- string line = sr.ReadLine();
-
- if (!string.IsNullOrEmpty(line))
- {
- string[] tokens = line.Split('=');
- //_properties.Add(tokens[0], tokens[1]);
- _properties.Put(tokens[0], tokens[1]);
- }
- }
- }
-
- public void Store(OutputStream output)
- {
- StreamWriter sw = new StreamWriter(output);
- foreach (var key in _properties.Keys)
- {
- string line = string.Format("{0}={1}", key, _properties[key]);
- sw.WriteLine(line);
- }
- }
-
- public void Store(TextWriter output)
- {
- foreach (var key in _properties.Keys)
- {
- string line = string.Format("{0}={1}", key, _properties[key]);
- output.WriteLine(line);
- }
- }
- }
-}