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
- ConfigurationException.cs
- ArcSegment.cs
- LocalValueEnumerator.cs
- PrinterSettings.cs
- HttpSysSettings.cs
- IgnoreFlushAndCloseStream.cs
- EndOfStreamException.cs
- VisemeEventArgs.cs
- Color.cs
- InkCanvasFeedbackAdorner.cs
- UrlMapping.cs
- DataPagerFieldCollection.cs
- StrokeFIndices.cs
- PinProtectionHelper.cs
- Matrix3DConverter.cs
- shaperfactory.cs
- Lookup.cs
- NativeMethods.cs
- KeyNotFoundException.cs
- RowUpdatingEventArgs.cs
- ProjectionPlan.cs
- SettingsProviderCollection.cs
- ConfigurationManagerInternalFactory.cs
- InheritablePropertyChangeInfo.cs
- TextTreeInsertElementUndoUnit.cs
- MgmtConfigurationRecord.cs
- WCFServiceClientProxyGenerator.cs
- MaterialGroup.cs
- EventWaitHandle.cs
- CustomCategoryAttribute.cs
- ConnectionStringsExpressionEditor.cs
- Blend.cs
- Types.cs
- XamlPointCollectionSerializer.cs
- Int32AnimationUsingKeyFrames.cs
- ResolveMatchesCD1.cs
- SecUtil.cs
- ConstNode.cs
- TriggerCollection.cs
- DataContractFormatAttribute.cs
- BitmapFrameEncode.cs
- activationcontext.cs
- TraceInternal.cs
- ColumnTypeConverter.cs
- HtmlHistory.cs
- Regex.cs
- ValidationPropertyAttribute.cs
- Type.cs
- InsufficientMemoryException.cs
- MenuBindingsEditorForm.cs
- CapabilitiesState.cs
- GeometryGroup.cs
- Walker.cs
- ExtentJoinTreeNode.cs
- BlurEffect.cs
- ValueProviderWrapper.cs
- SqlDuplicator.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- BufferModesCollection.cs
- TcpProcessProtocolHandler.cs
- AddInPipelineAttributes.cs
- PrePostDescendentsWalker.cs
- SimpleType.cs
- ValidatorCompatibilityHelper.cs
- DesignOnlyAttribute.cs
- CompareValidator.cs
- SequentialUshortCollection.cs
- ToolStripKeyboardHandlingService.cs
- EntityDataSourceView.cs
- Regex.cs
- Condition.cs
- SolidColorBrush.cs
- ConfigXmlCDataSection.cs
- HandlerElementCollection.cs
- ByteStorage.cs
- _SingleItemRequestCache.cs
- Int32AnimationBase.cs
- MouseGesture.cs
- DataGridViewSortCompareEventArgs.cs
- NumericExpr.cs
- Table.cs
- Interlocked.cs
- PeerApplicationLaunchInfo.cs
- VirtualDirectoryMapping.cs
- TracedNativeMethods.cs
- BasicKeyConstraint.cs
- UserPrincipalNameElement.cs
- IsolatedStoragePermission.cs
- Formatter.cs
- CapabilitiesSection.cs
- BaseWebProxyFinder.cs
- ItemsChangedEventArgs.cs
- Attributes.cs
- MSG.cs
- ImmutableObjectAttribute.cs
- EventWaitHandleSecurity.cs
- RewritingProcessor.cs
- RelationshipDetailsCollection.cs
- LayoutEditorPart.cs
- VisualStateChangedEventArgs.cs