Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / Security / Policy / IBuiltInEvidence.cs / 1 / IBuiltInEvidence.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // IBuiltInEvidence.cs // namespace System.Security.Policy { internal interface IBuiltInEvidence { int OutputToBuffer( char[] buffer, int position, bool verbose ); // Initializes a class according to data in the buffer. Returns new position within buffer int InitFromBuffer( char[] buffer, int position); int GetRequiredSize(bool verbose); } internal static class BuiltInEvidenceHelper { internal const char idApplicationDirectory = (char)0; #if !FEATURE_PAL internal const char idPublisher = (char)1; #endif //!FEATURE_PAL internal const char idStrongName = (char)2; internal const char idZone = (char)3; internal const char idUrl = (char)4; internal const char idWebPage = (char)5; internal const char idSite = (char)6; internal const char idPermissionRequestEvidence = (char)7; #if !FEATURE_PAL internal const char idHash = (char)8; #endif // !FEATURE_PAL internal const char idGac = (char)9; internal static void CopyIntToCharArray( int value, char[] buffer, int position ) { buffer[position ] = (char)((value >> 16) & 0x0000FFFF); buffer[position + 1] = (char)((value ) & 0x0000FFFF); } internal static int GetIntFromCharArray(char[] buffer, int position ) { int value = (int)buffer[position]; value = value << 16; value += (int)buffer[position + 1]; return value; } internal static void CopyLongToCharArray( long value, char[] buffer, int position ) { buffer[position ] = (char)((value >> 48) & 0x000000000000FFFF); buffer[position + 1] = (char)((value >> 32) & 0x000000000000FFFF); buffer[position + 2] = (char)((value >> 16) & 0x000000000000FFFF); buffer[position + 3] = (char)((value ) & 0x000000000000FFFF); } internal static long GetLongFromCharArray(char[] buffer, int position ) { long value = (long)buffer[position]; value = value << 16; value += (long)buffer[position + 1]; value = value << 16; value += (long)buffer[position + 2]; value = value << 16; value += (long)buffer[position + 3]; return value; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // // IBuiltInEvidence.cs // namespace System.Security.Policy { internal interface IBuiltInEvidence { int OutputToBuffer( char[] buffer, int position, bool verbose ); // Initializes a class according to data in the buffer. Returns new position within buffer int InitFromBuffer( char[] buffer, int position); int GetRequiredSize(bool verbose); } internal static class BuiltInEvidenceHelper { internal const char idApplicationDirectory = (char)0; #if !FEATURE_PAL internal const char idPublisher = (char)1; #endif //!FEATURE_PAL internal const char idStrongName = (char)2; internal const char idZone = (char)3; internal const char idUrl = (char)4; internal const char idWebPage = (char)5; internal const char idSite = (char)6; internal const char idPermissionRequestEvidence = (char)7; #if !FEATURE_PAL internal const char idHash = (char)8; #endif // !FEATURE_PAL internal const char idGac = (char)9; internal static void CopyIntToCharArray( int value, char[] buffer, int position ) { buffer[position ] = (char)((value >> 16) & 0x0000FFFF); buffer[position + 1] = (char)((value ) & 0x0000FFFF); } internal static int GetIntFromCharArray(char[] buffer, int position ) { int value = (int)buffer[position]; value = value << 16; value += (int)buffer[position + 1]; return value; } internal static void CopyLongToCharArray( long value, char[] buffer, int position ) { buffer[position ] = (char)((value >> 48) & 0x000000000000FFFF); buffer[position + 1] = (char)((value >> 32) & 0x000000000000FFFF); buffer[position + 2] = (char)((value >> 16) & 0x000000000000FFFF); buffer[position + 3] = (char)((value ) & 0x000000000000FFFF); } internal static long GetLongFromCharArray(char[] buffer, int position ) { long value = (long)buffer[position]; value = value << 16; value += (long)buffer[position + 1]; value = value << 16; value += (long)buffer[position + 2]; value = value << 16; value += (long)buffer[position + 3]; return 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
- AmbiguousMatchException.cs
- TimeEnumHelper.cs
- DispatchChannelSink.cs
- XamlContextStack.cs
- TreeView.cs
- ServiceAppDomainAssociationProvider.cs
- FactoryGenerator.cs
- SynchronousSendBindingElement.cs
- WindowAutomationPeer.cs
- COM2PictureConverter.cs
- PersonalizableTypeEntry.cs
- CacheOutputQuery.cs
- SqlTriggerAttribute.cs
- DllHostInitializer.cs
- WebPartVerbsEventArgs.cs
- DesignSurfaceServiceContainer.cs
- LineSegment.cs
- ObjectListDesigner.cs
- DefaultPropertyAttribute.cs
- NCryptNative.cs
- FontEmbeddingManager.cs
- DesignObjectWrapper.cs
- WriterOutput.cs
- ContactManager.cs
- StringFormat.cs
- MouseDevice.cs
- WmlLinkAdapter.cs
- XsdBuildProvider.cs
- AssemblyNameProxy.cs
- EmptyReadOnlyDictionaryInternal.cs
- EditorPart.cs
- EmptyEnumerable.cs
- DataFormat.cs
- X509SecurityTokenAuthenticator.cs
- ProtocolsSection.cs
- ManagementPath.cs
- DATA_BLOB.cs
- KerberosRequestorSecurityToken.cs
- _ListenerResponseStream.cs
- handlecollector.cs
- FontDialog.cs
- PrivilegeNotHeldException.cs
- SystemWebSectionGroup.cs
- BufferedStream.cs
- Decoder.cs
- ErrorHandler.cs
- HttpPostedFile.cs
- GroupStyle.cs
- CreateUserWizardStep.cs
- DataGridTable.cs
- StrongNameUtility.cs
- Pen.cs
- ReceiveContextCollection.cs
- HtmlForm.cs
- TaskCanceledException.cs
- DocumentGridContextMenu.cs
- TabControl.cs
- SendKeys.cs
- XPathDocumentBuilder.cs
- PolyLineSegment.cs
- WeakRefEnumerator.cs
- Popup.cs
- ObjectMaterializedEventArgs.cs
- ThicknessAnimationBase.cs
- EpmSyndicationContentDeSerializer.cs
- ExtractedStateEntry.cs
- SerialPort.cs
- HtmlInputCheckBox.cs
- BorderGapMaskConverter.cs
- StylusButtonCollection.cs
- VirtualizedItemPattern.cs
- Operand.cs
- XXXOnTypeBuilderInstantiation.cs
- WpfGeneratedKnownProperties.cs
- FontFamilyIdentifier.cs
- MemberPathMap.cs
- Scanner.cs
- ConditionValidator.cs
- PreviewPrintController.cs
- ResourceExpression.cs
- UIElement3D.cs
- TabControlAutomationPeer.cs
- HtmlTableCell.cs
- FastEncoder.cs
- DesignRelationCollection.cs
- HttpListener.cs
- XmlProcessingInstruction.cs
- RectangleGeometry.cs
- ObjectDataSourceStatusEventArgs.cs
- HtmlCalendarAdapter.cs
- PermissionSet.cs
- oledbconnectionstring.cs
- EntityConnection.cs
- XPathEmptyIterator.cs
- _ConnectStream.cs
- SurrogateSelector.cs
- Pkcs9Attribute.cs
- DirectoryObjectSecurity.cs
- TypefaceMap.cs
- FigureParagraph.cs