Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- ScriptResourceHandler.cs
- DataGridViewAccessibleObject.cs
- FloaterParaClient.cs
- AsymmetricSignatureFormatter.cs
- PartitionResolver.cs
- RegexRunner.cs
- FontCacheLogic.cs
- AppDomainUnloadedException.cs
- RepeatInfo.cs
- WindowsPen.cs
- SerializationEventsCache.cs
- ProfileInfo.cs
- ItemList.cs
- Int32RectConverter.cs
- TypeDependencyAttribute.cs
- CodeDOMProvider.cs
- Normalizer.cs
- ConsoleCancelEventArgs.cs
- DBConnectionString.cs
- Add.cs
- TabControl.cs
- RegexGroupCollection.cs
- Track.cs
- MediaPlayerState.cs
- HtmlEmptyTagControlBuilder.cs
- WhitespaceRuleLookup.cs
- figurelength.cs
- UIElement3D.cs
- EventLog.cs
- FreeFormDragDropManager.cs
- CollectionBase.cs
- TrackingLocationCollection.cs
- EnumMember.cs
- PenLineJoinValidation.cs
- PathFigureCollection.cs
- SourceChangedEventArgs.cs
- SubclassTypeValidatorAttribute.cs
- AbstractSvcMapFileLoader.cs
- RowSpanVector.cs
- RegexNode.cs
- HwndKeyboardInputProvider.cs
- ImageClickEventArgs.cs
- EntityCommandCompilationException.cs
- PageAsyncTaskManager.cs
- ConfigXmlComment.cs
- TransactionChannelFaultConverter.cs
- CounterSampleCalculator.cs
- PrintDialog.cs
- TextRangeProviderWrapper.cs
- TypeSemantics.cs
- TextCollapsingProperties.cs
- ObjectKeyFrameCollection.cs
- EntityDataSource.cs
- Vector3D.cs
- MatrixStack.cs
- PropertyTab.cs
- SvcMapFileLoader.cs
- IpcServerChannel.cs
- DesignerVerb.cs
- XmlDataSourceView.cs
- AsymmetricSignatureDeformatter.cs
- XmlWrappingReader.cs
- SqlLiftWhereClauses.cs
- ServiceBusyException.cs
- QuaternionKeyFrameCollection.cs
- GenericEnumConverter.cs
- RijndaelManagedTransform.cs
- TableCell.cs
- SlipBehavior.cs
- Ticks.cs
- FontInfo.cs
- NotImplementedException.cs
- AnimationStorage.cs
- HttpHeaderCollection.cs
- ModelPropertyCollectionImpl.cs
- ToolStripContentPanel.cs
- ZipPackage.cs
- EdgeProfileValidation.cs
- NameGenerator.cs
- VisualStyleElement.cs
- AssemblyNameUtility.cs
- ConfigurationPermission.cs
- ImmutableObjectAttribute.cs
- SQLByteStorage.cs
- SafeFileMappingHandle.cs
- PropertyInformation.cs
- XmlRawWriter.cs
- HintTextMaxWidthConverter.cs
- UInt16Converter.cs
- SecUtil.cs
- MailDefinition.cs
- IndentedTextWriter.cs
- SoapException.cs
- RightsManagementEncryptedStream.cs
- RotateTransform.cs
- Root.cs
- MethodMessage.cs
- ThemeConfigurationDialog.cs
- CommentEmitter.cs
- Underline.cs