diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 11:18:42 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-03-10 17:39:53 +0100 |
commit | f7dca812510ee7f5940c82225d2eb95787ff64bd (patch) | |
tree | 52d21eb64ee9a9fd6925315bcff68d03df0479be /cli_ure | |
parent | ce7cc9d92d2b85e079a19db6b040c3392a0fc541 (diff) |
cli_ure: simplify deprecated XTypeProvider.getImplementationId
Change-Id: If6f975bdc3d554828ff1ad3adc656579eda92a42
Diffstat (limited to 'cli_ure')
-rw-r--r-- | cli_ure/source/ure/uno/util/WeakBase.cs | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/cli_ure/source/ure/uno/util/WeakBase.cs b/cli_ure/source/ure/uno/util/WeakBase.cs index 4421f80ae9cc..561d2e577ff2 100644 --- a/cli_ure/source/ure/uno/util/WeakBase.cs +++ b/cli_ure/source/ure/uno/util/WeakBase.cs @@ -109,41 +109,9 @@ public class WeakBase : XWeak, XTypeProvider return types; } - /** Provides an identifier that represents the set of UNO interfaces - implemented by this class. All instances of this class which run - in the same CLR return the same array. - - @return identifier as array of bytes - */ public byte [] getImplementationId() { - byte [] id; - Type type = GetType(); - lock (s_impl_ids) - { - id = (byte []) s_impl_ids[ type ]; - if (null == id) - { - Int32 hash = GetHashCode(); - String name = type.FullName; - Int32 len= name.Length; - - id = new byte[ 4 + (2 * len) ]; - id[ 0 ]= (byte) (hash & 0xff); - id[ 1 ]= (byte) ((hash >> 8) & 0xff); - id[ 2 ]= (byte) ((hash >> 16) & 0xff); - id[ 3 ]= (byte) ((hash >> 24) & 0xff); - - for ( Int32 pos = 0; pos < len; ++pos ) - { - UInt16 c = Convert.ToUInt16( name[ pos ] ); - id[ 4 + (2 * pos) ] = (byte) (c & 0xff); - id[ 4 + (2 * pos) +1 ] = (byte) ((c >> 8) & 0xff); - } - s_impl_ids[ type ] = id; - } - } - return id; + return new byte[0]; } // System.Object @@ -151,9 +119,7 @@ public class WeakBase : XWeak, XTypeProvider { System.Text.StringBuilder buf = new System.Text.StringBuilder( base.ToString(), 256 ); - buf.Append( "\nUNO Object Implementation:\n\tImplementationId: " ); - buf.Append( getImplementationId() ); - buf.Append( "\n\tInterfaces: " ); + buf.Append( "\nUNO Object Implementation:\n\tInterfaces: " ); Type [] types = getTypes(); for ( Int32 pos = 0; pos < types.Length; ++pos ) { |