src/Castle.Core/DynamicProxy/ModuleScope.cs
/// <summary>
///   Gets the key pair used to sign the strong-named assembly generated by this <see cref = "ModuleScope" />.
/// </summary>
Gets the key pair used to sign the strong-named assembly generated by this .
Gets the key pair used to sign the strong - named assembly generated by this .
public static byte[] GetKeyPair()
		{
			using (var stream = typeof(ModuleScope).GetTypeInfo().Assembly.GetManifestResourceStream("Castle.DynamicProxy.DynProxy.snk"))
			{
				if (stream == null)
				{
					throw new MissingManifestResourceException(
						"Should have a Castle.DynamicProxy.DynProxy.snk as an embedded resource, so Dynamic Proxy could sign generated assembly");
				}
				var length = (int)stream.Length;
				var keyPair = new byte[length];
				stream.Read(keyPair, 0, length);
				return keyPair;
			}
		}
public static byte [ ] GetKeyPair ( ) { using ( var stream = typeof ( ModuleScope ) . GetTypeInfo ( ) . Assembly . GetManifestResourceStream ( " " ) ) { if ( stream == null ) { throw new MissingManifestResourceException ( " " ) ; } var length = ( int ) stream . Length ; var keyPair = new byte [ length ] ; stream . Read ( keyPair , 0 , length ) ; return keyPair ; } }
Gets the key pair used to sign the strong-named assembly generated by this .
Gets the key pair used to sign the strong - named assembly generated by this .