From 48eba7bca44e37008878b368f9226c453cd00d57 Mon Sep 17 00:00:00 2001 From: Alexandre Mutel Date: Mon, 11 Mar 2013 23:59:53 +0900 Subject: [PATCH] [SharpDX] Rename SharpDX.Win32.PropertyKey to PropertyBagKey --- .../WIC/BitmapEncoderOptions.cs | 22 +++++++++---------- Source/SharpDX/SharpDX.csproj | 2 +- Source/SharpDX/Win32/PropertyBag.cs | 8 +++---- .../{PropertyKey.cs => PropertyBagKey.cs} | 6 ++--- 4 files changed, 19 insertions(+), 19 deletions(-) rename Source/SharpDX/Win32/{PropertyKey.cs => PropertyBagKey.cs} (93%) diff --git a/Source/SharpDX.Direct2D1/WIC/BitmapEncoderOptions.cs b/Source/SharpDX.Direct2D1/WIC/BitmapEncoderOptions.cs index 3c83a4572..9ef03a7a7 100644 --- a/Source/SharpDX.Direct2D1/WIC/BitmapEncoderOptions.cs +++ b/Source/SharpDX.Direct2D1/WIC/BitmapEncoderOptions.cs @@ -51,7 +51,7 @@ public float ImageQuality get { return Get(ImageQualityKey); } set { Set(ImageQualityKey, value);} } - private static readonly PropertyKey ImageQualityKey = new PropertyKey("ImageQuality"); + private static readonly PropertyBagKey ImageQualityKey = new PropertyBagKey("ImageQuality"); /// /// Gets or sets the compression quality. @@ -68,7 +68,7 @@ public float CompressionQuality get { return Get(CompressionQualityKey); } set { Set(CompressionQualityKey, value); } } - private static readonly PropertyKey CompressionQualityKey = new PropertyKey("CompressionQuality"); + private static readonly PropertyBagKey CompressionQualityKey = new PropertyBagKey("CompressionQuality"); /// /// Gets or sets a value indicating whether loss less compression is enabled. @@ -85,7 +85,7 @@ public bool LossLess get { return Get(LosslessKey); } set { Set(LosslessKey, value); } } - private static readonly PropertyKey LosslessKey = new PropertyKey("Lossless"); + private static readonly PropertyBagKey LosslessKey = new PropertyBagKey("Lossless"); /// /// Gets or sets the bitmap transform. @@ -102,7 +102,7 @@ public BitmapTransformOptions BitmapTransform get { return Get(BitmapTransformKey); } set { Set(BitmapTransformKey, value); } } - private static readonly PropertyKey BitmapTransformKey = new PropertyKey("BitmapTransform"); + private static readonly PropertyBagKey BitmapTransformKey = new PropertyBagKey("BitmapTransform"); /// /// Gets or sets a value indicating whether [interlace option]. @@ -119,7 +119,7 @@ public bool InterlaceOption get { return Get(InterlaceOptionKey); } set { Set(InterlaceOptionKey, value); } } - private static readonly PropertyKey InterlaceOptionKey = new PropertyKey("InterlaceOption"); + private static readonly PropertyBagKey InterlaceOptionKey = new PropertyBagKey("InterlaceOption"); /// /// Gets or sets the filter option. @@ -136,7 +136,7 @@ public PngFilterOption FilterOption get { return Get(FilterOptionKey); } set { Set(FilterOptionKey, value); } } - private static readonly PropertyKey FilterOptionKey = new PropertyKey("FilterOption"); + private static readonly PropertyBagKey FilterOptionKey = new PropertyBagKey("FilterOption"); /// /// Gets or sets the TIFF compression method. @@ -153,7 +153,7 @@ public TiffCompressionOption TiffCompressionMethod get { return Get(TiffCompressionMethodKey); } set { Set(TiffCompressionMethodKey, value); } } - private static readonly PropertyKey TiffCompressionMethodKey = new PropertyKey("TiffCompressionMethod"); + private static readonly PropertyBagKey TiffCompressionMethodKey = new PropertyBagKey("TiffCompressionMethod"); /// /// Gets or sets the luminance. @@ -170,7 +170,7 @@ public uint[] Luminance get { return Get(LuminanceKey); } set { Set(LuminanceKey, value); } } - private static readonly PropertyKey LuminanceKey = new PropertyKey("Luminance"); + private static readonly PropertyBagKey LuminanceKey = new PropertyBagKey("Luminance"); /// /// Gets or sets the chrominance. @@ -187,7 +187,7 @@ public uint[] Chrominance get { return Get(ChrominanceKey); } set { Set(ChrominanceKey, value); } } - private static readonly PropertyKey ChrominanceKey = new PropertyKey("Chrominance"); + private static readonly PropertyBagKey ChrominanceKey = new PropertyBagKey("Chrominance"); /// /// Gets or sets the JPEG Y cr cb subsampling. @@ -204,7 +204,7 @@ public JpegYCrCbSubsamplingOption JpegYCrCbSubsampling get { return Get(JpegYCrCbSubsamplingKey); } set { Set(JpegYCrCbSubsamplingKey, value); } } - private static readonly PropertyKey JpegYCrCbSubsamplingKey = new PropertyKey("JpegYCrCbSubsampling"); + private static readonly PropertyBagKey JpegYCrCbSubsamplingKey = new PropertyBagKey("JpegYCrCbSubsampling"); /// /// Gets or sets a value indicating whether [suppress app0]. @@ -221,6 +221,6 @@ public bool SuppressApp0 get { return Get(SuppressApp0Key); } set { Set(SuppressApp0Key, value); } } - private static readonly PropertyKey SuppressApp0Key = new PropertyKey("SuppressApp0"); + private static readonly PropertyBagKey SuppressApp0Key = new PropertyBagKey("SuppressApp0"); } } \ No newline at end of file diff --git a/Source/SharpDX/SharpDX.csproj b/Source/SharpDX/SharpDX.csproj index 41b6f91e6..3cd24378c 100644 --- a/Source/SharpDX/SharpDX.csproj +++ b/Source/SharpDX/SharpDX.csproj @@ -188,7 +188,7 @@ - + diff --git a/Source/SharpDX/Win32/PropertyBag.cs b/Source/SharpDX/Win32/PropertyBag.cs index ef41c823b..40a4f6c94 100644 --- a/Source/SharpDX/Win32/PropertyBag.cs +++ b/Source/SharpDX/Win32/PropertyBag.cs @@ -109,13 +109,13 @@ public object Get(string name) } /// - /// Gets the value of the property by using a + /// Gets the value of the property by using a /// /// The public type of this property. /// The marshaling type of this property. /// The property key. /// Value of the property - public T1 Get(PropertyKey propertyKey) + public T1 Get(PropertyBagKey propertyKey) { var value = Get(propertyKey.Name); return (T1) Convert.ChangeType(value, typeof (T1)); @@ -142,13 +142,13 @@ public void Set(string name, object value) } /// - /// Sets the value of the property by using a + /// Sets the value of the property by using a /// /// The public type of this property. /// The marshaling type of this property. /// The property key. /// The value. - public void Set(PropertyKey propertyKey, T1 value) + public void Set(PropertyBagKey propertyKey, T1 value) { Set(propertyKey.Name, value); } diff --git a/Source/SharpDX/Win32/PropertyKey.cs b/Source/SharpDX/Win32/PropertyBagKey.cs similarity index 93% rename from Source/SharpDX/Win32/PropertyKey.cs rename to Source/SharpDX/Win32/PropertyBagKey.cs index aeb4f87ef..309b3174a 100644 --- a/Source/SharpDX/Win32/PropertyKey.cs +++ b/Source/SharpDX/Win32/PropertyBagKey.cs @@ -25,13 +25,13 @@ namespace SharpDX.Win32 /// /// The public type of this property. /// The marshaling type of this property. - public class PropertyKey + public class PropertyBagKey { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The name. - public PropertyKey(string name) + public PropertyBagKey(string name) { Name = name; }