Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Configuration / Assemblies / AssemblyHash.cs / 1305376 / AssemblyHash.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** File: AssemblyHash
**
**
** Purpose:
**
**
===========================================================*/
namespace System.Configuration.Assemblies {
using System;
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public struct AssemblyHash : ICloneable
{
private AssemblyHashAlgorithm _Algorithm;
private byte[] _Value;
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public static readonly AssemblyHash Empty = new AssemblyHash(AssemblyHashAlgorithm.None, null);
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHash(byte[] value) {
_Algorithm = AssemblyHashAlgorithm.SHA1;
_Value = null;
if (value != null) {
int length = value.Length;
_Value = new byte[length];
Array.Copy(value, _Value, length);
}
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHash(AssemblyHashAlgorithm algorithm, byte[] value) {
_Algorithm = algorithm;
_Value = null;
if (value != null) {
int length = value.Length;
_Value = new byte[length];
Array.Copy(value, _Value, length);
}
}
// Hash is made up of a byte array and a value from a class of supported
// algorithm types.
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHashAlgorithm Algorithm {
get { return _Algorithm; }
set { _Algorithm = value; }
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public byte[] GetValue() {
return _Value;
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public void SetValue(byte[] value) {
_Value = value;
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public Object Clone() {
return new AssemblyHash(_Algorithm, _Value);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** File: AssemblyHash
**
**
** Purpose:
**
**
===========================================================*/
namespace System.Configuration.Assemblies {
using System;
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public struct AssemblyHash : ICloneable
{
private AssemblyHashAlgorithm _Algorithm;
private byte[] _Value;
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public static readonly AssemblyHash Empty = new AssemblyHash(AssemblyHashAlgorithm.None, null);
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHash(byte[] value) {
_Algorithm = AssemblyHashAlgorithm.SHA1;
_Value = null;
if (value != null) {
int length = value.Length;
_Value = new byte[length];
Array.Copy(value, _Value, length);
}
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHash(AssemblyHashAlgorithm algorithm, byte[] value) {
_Algorithm = algorithm;
_Value = null;
if (value != null) {
int length = value.Length;
_Value = new byte[length];
Array.Copy(value, _Value, length);
}
}
// Hash is made up of a byte array and a value from a class of supported
// algorithm types.
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public AssemblyHashAlgorithm Algorithm {
get { return _Algorithm; }
set { _Algorithm = value; }
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public byte[] GetValue() {
return _Value;
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public void SetValue(byte[] value) {
_Value = value;
}
[Obsolete("The AssemblyHash class has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
public Object Clone() {
return new AssemblyHash(_Algorithm, _Value);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EntityDataSourceEntityTypeFilterConverter.cs
- SchemaNamespaceManager.cs
- _NtlmClient.cs
- WebSysDescriptionAttribute.cs
- CompositeFontInfo.cs
- StrongNameUtility.cs
- SqlTrackingQuery.cs
- adornercollection.cs
- UrlAuthorizationModule.cs
- CommandField.cs
- SoapIncludeAttribute.cs
- EventLogInformation.cs
- FixedSOMPageElement.cs
- IISUnsafeMethods.cs
- EntityDescriptor.cs
- WmlLiteralTextAdapter.cs
- DataPagerFieldCollection.cs
- InputMethodStateTypeInfo.cs
- SqlFlattener.cs
- ResourceDisplayNameAttribute.cs
- RunWorkerCompletedEventArgs.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- RequestQueue.cs
- GridViewPageEventArgs.cs
- PropertyPathWorker.cs
- EntitySqlException.cs
- PropertyToken.cs
- InlineUIContainer.cs
- ThreadAbortException.cs
- rsa.cs
- AuthenticationModuleElement.cs
- XmlElementAttributes.cs
- StateDesigner.TransitionInfo.cs
- Missing.cs
- BufferedWebEventProvider.cs
- IEnumerable.cs
- ProcessStartInfo.cs
- UnmanagedMemoryStream.cs
- WindowsUpDown.cs
- State.cs
- ObjRef.cs
- MgmtResManager.cs
- Sql8ConformanceChecker.cs
- InputLanguageManager.cs
- XmlDictionaryWriter.cs
- BookmarkWorkItem.cs
- XslCompiledTransform.cs
- PenThreadPool.cs
- SqlErrorCollection.cs
- XmlEventCache.cs
- FieldBuilder.cs
- AuthenticationService.cs
- OdbcConnectionString.cs
- XmlSchemaChoice.cs
- MissingMethodException.cs
- ActivityValidationServices.cs
- SafeViewOfFileHandle.cs
- BitmapCodecInfoInternal.cs
- XmlDataLoader.cs
- TrackingStringDictionary.cs
- EdmValidator.cs
- WpfKnownMember.cs
- ComboBoxRenderer.cs
- LayoutTableCell.cs
- AmbientProperties.cs
- TraceSource.cs
- ClusterUtils.cs
- TrackBarRenderer.cs
- DoubleLink.cs
- CodeDesigner.cs
- CompilationSection.cs
- DataError.cs
- HttpWebRequest.cs
- PnrpPermission.cs
- ImageDrawing.cs
- IgnorePropertiesAttribute.cs
- ResourceWriter.cs
- RenamedEventArgs.cs
- DbConnectionHelper.cs
- MemberProjectionIndex.cs
- TypefaceCollection.cs
- Bitmap.cs
- _HeaderInfo.cs
- Send.cs
- TypedReference.cs
- BitHelper.cs
- Propagator.cs
- ImageFormatConverter.cs
- ApplicationProxyInternal.cs
- InvalidOperationException.cs
- ResumeStoryboard.cs
- FrameDimension.cs
- FileDialog.cs
- LogSwitch.cs
- HttpPostServerProtocol.cs
- DoubleAnimationUsingKeyFrames.cs
- _NegoStream.cs
- ScriptingWebServicesSectionGroup.cs
- Operators.cs
- CqlGenerator.cs