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
- MetadataSerializer.cs
- SchemaElementLookUpTableEnumerator.cs
- UnitySerializationHolder.cs
- FaultCode.cs
- InputScopeNameConverter.cs
- AnnotationComponentChooser.cs
- SourceFilter.cs
- mactripleDES.cs
- BrowserDefinition.cs
- StandardCommands.cs
- BaseDataBoundControl.cs
- ArgumentOutOfRangeException.cs
- JsonDeserializer.cs
- BaseServiceProvider.cs
- XmlSchemaSimpleContentRestriction.cs
- QueuePathDialog.cs
- AuthenticationConfig.cs
- XamlWriter.cs
- Expressions.cs
- FileLoadException.cs
- OrderedDictionaryStateHelper.cs
- NamespaceMapping.cs
- EntityDataSourceView.cs
- TextCharacters.cs
- WebPartZone.cs
- OracleLob.cs
- UriTemplateLiteralQueryValue.cs
- MimeParameterWriter.cs
- CompiledXpathExpr.cs
- RegistryPermission.cs
- WmlControlAdapter.cs
- TypeDependencyAttribute.cs
- DataGridViewHeaderCell.cs
- NewItemsContextMenuStrip.cs
- CodeAttributeArgument.cs
- SiteMapNodeItem.cs
- BindingCompleteEventArgs.cs
- securitycriticaldataformultiplegetandset.cs
- TypeToken.cs
- RuleSet.cs
- XPathQilFactory.cs
- DoubleCollection.cs
- StringFunctions.cs
- FileDetails.cs
- Message.cs
- Cursors.cs
- FacetEnabledSchemaElement.cs
- PlatformNotSupportedException.cs
- PageEventArgs.cs
- ModelItemDictionary.cs
- XsdSchemaFileEditor.cs
- ReflectionPermission.cs
- ProfilePropertySettings.cs
- SettingsSection.cs
- UTF8Encoding.cs
- WhitespaceRuleReader.cs
- RawStylusInputCustomDataList.cs
- DesignerAttributeInfo.cs
- EraserBehavior.cs
- NestPullup.cs
- ElementsClipboardData.cs
- TdsParser.cs
- IndexedSelectQueryOperator.cs
- AdobeCFFWrapper.cs
- DesignerForm.cs
- JumpTask.cs
- ToolStripManager.cs
- Span.cs
- AsymmetricSignatureFormatter.cs
- SystemBrushes.cs
- ZipIOModeEnforcingStream.cs
- __Error.cs
- RegexCompiler.cs
- RootCodeDomSerializer.cs
- SessionPageStateSection.cs
- Enum.cs
- SocketElement.cs
- Attributes.cs
- AxWrapperGen.cs
- RegexGroupCollection.cs
- DbConnectionFactory.cs
- SymmetricAlgorithm.cs
- XmlMapping.cs
- NetCodeGroup.cs
- XmlText.cs
- SettingsBase.cs
- EventLogPermissionEntry.cs
- StorageComplexPropertyMapping.cs
- RawStylusInputCustomDataList.cs
- RelationalExpressions.cs
- MULTI_QI.cs
- XamlToRtfWriter.cs
- TagPrefixAttribute.cs
- EntityContainer.cs
- Column.cs
- AutoResetEvent.cs
- ExternalCalls.cs
- SqlTriggerAttribute.cs
- WebConfigurationFileMap.cs
- XmlEntityReference.cs