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
- FilePrompt.cs
- ConfigErrorGlyph.cs
- ListControl.cs
- PopOutPanel.cs
- SoapInteropTypes.cs
- BitmapEffectDrawing.cs
- LocatorGroup.cs
- httpapplicationstate.cs
- EdmTypeAttribute.cs
- DeclarativeCatalogPart.cs
- AnimationException.cs
- ADConnectionHelper.cs
- Span.cs
- PageCatalogPart.cs
- SimpleFieldTemplateUserControl.cs
- HtmlContainerControl.cs
- MetadataCache.cs
- HtmlMeta.cs
- SmiEventSink_DeferedProcessing.cs
- TextServicesHost.cs
- EventDescriptorCollection.cs
- VirtualizedContainerService.cs
- IResourceProvider.cs
- SyndicationElementExtension.cs
- ConnectionConsumerAttribute.cs
- BCLDebug.cs
- InternalConfigConfigurationFactory.cs
- CompoundFileStorageReference.cs
- StringStorage.cs
- XmlSerializerFactory.cs
- ToolStrip.cs
- StateItem.cs
- AuthenticationSection.cs
- DataSourceControlBuilder.cs
- TemplateInstanceAttribute.cs
- HttpContextWrapper.cs
- StringArrayConverter.cs
- TextParentUndoUnit.cs
- DeclarativeCatalogPartDesigner.cs
- InternalTypeHelper.cs
- PageContentCollection.cs
- Empty.cs
- SafeFindHandle.cs
- SerializationAttributes.cs
- DataGridRowsPresenter.cs
- CLSCompliantAttribute.cs
- Expression.cs
- CookielessHelper.cs
- Attributes.cs
- DataGridColumnCollection.cs
- GifBitmapDecoder.cs
- SchemaObjectWriter.cs
- XmlCompatibilityReader.cs
- PropertyManager.cs
- TextRange.cs
- SqlError.cs
- StyleBamlRecordReader.cs
- DataControlImageButton.cs
- Authorization.cs
- InfoCard.cs
- LocalizedNameDescriptionPair.cs
- MessageContractAttribute.cs
- PropertyGridEditorPart.cs
- GridViewEditEventArgs.cs
- WS2007FederationHttpBindingElement.cs
- ListItemCollection.cs
- CurrentChangingEventArgs.cs
- FamilyTypefaceCollection.cs
- SchemaComplexType.cs
- RepeaterCommandEventArgs.cs
- GridViewCancelEditEventArgs.cs
- TableLayoutPanelBehavior.cs
- ListMarkerSourceInfo.cs
- BooleanToVisibilityConverter.cs
- ResourceSetExpression.cs
- Root.cs
- SqlCaseSimplifier.cs
- EncryptedPackage.cs
- KeyProperty.cs
- DocumentViewerBase.cs
- XamlStackWriter.cs
- RegexCharClass.cs
- AsymmetricSecurityBindingElement.cs
- OAVariantLib.cs
- DataSourceDescriptorCollection.cs
- IISUnsafeMethods.cs
- ManagementInstaller.cs
- ConnectAlgorithms.cs
- OleDbConnectionInternal.cs
- ExpressionParser.cs
- IncrementalCompileAnalyzer.cs
- BitmapEncoder.cs
- DbExpressionBuilder.cs
- RootCodeDomSerializer.cs
- IpcServerChannel.cs
- Lasso.cs
- SecurityTokenValidationException.cs
- StoreItemCollection.cs
- FixedDSBuilder.cs
- FixedElement.cs