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
- MediaPlayer.cs
- BordersPage.cs
- RemoteWebConfigurationHostServer.cs
- ValueQuery.cs
- GuidConverter.cs
- SingleStorage.cs
- IsolatedStorageFilePermission.cs
- ProcessingInstructionAction.cs
- SafeProcessHandle.cs
- ActiveXContainer.cs
- TextBoxBase.cs
- HttpDebugHandler.cs
- QueryInterceptorAttribute.cs
- Decimal.cs
- DesignerActionTextItem.cs
- InkCanvasAutomationPeer.cs
- Material.cs
- CqlLexer.cs
- KeyedHashAlgorithm.cs
- FileReader.cs
- Guid.cs
- PathStreamGeometryContext.cs
- ExpandSegmentCollection.cs
- DelegatedStream.cs
- GridView.cs
- GridViewCancelEditEventArgs.cs
- MailWebEventProvider.cs
- InvariantComparer.cs
- XmlBaseReader.cs
- FileCodeGroup.cs
- TimeEnumHelper.cs
- WindowsStatusBar.cs
- FullTrustAssemblyCollection.cs
- WebUtil.cs
- RootBuilder.cs
- SurrogateEncoder.cs
- XmlILAnnotation.cs
- UIElementParagraph.cs
- _AutoWebProxyScriptHelper.cs
- ClientProxyGenerator.cs
- ZipIOCentralDirectoryFileHeader.cs
- SafeThemeHandle.cs
- TdsParserHelperClasses.cs
- ISessionStateStore.cs
- AttachInfo.cs
- SqlConnection.cs
- CompositeKey.cs
- Util.cs
- EDesignUtil.cs
- WorkflowStateRollbackService.cs
- BoundColumn.cs
- XhtmlBasicSelectionListAdapter.cs
- NegotiateStream.cs
- DesignColumnCollection.cs
- SqlSelectStatement.cs
- TypeForwardedFromAttribute.cs
- Animatable.cs
- PartialCachingControl.cs
- TempFiles.cs
- TextBoxAutomationPeer.cs
- XmlDeclaration.cs
- MergePropertyDescriptor.cs
- SplitterPanel.cs
- QueueAccessMode.cs
- entityreference_tresulttype.cs
- SplashScreenNativeMethods.cs
- Psha1DerivedKeyGenerator.cs
- VersionPair.cs
- ViewDesigner.cs
- UserUseLicenseDictionaryLoader.cs
- RuntimeHelpers.cs
- TeredoHelper.cs
- InstanceCollisionException.cs
- PolicyManager.cs
- HintTextMaxWidthConverter.cs
- IntegerFacetDescriptionElement.cs
- File.cs
- ValueSerializer.cs
- BitSet.cs
- RangeBase.cs
- Evidence.cs
- NestPullup.cs
- AdditionalEntityFunctions.cs
- OleDbConnectionFactory.cs
- XPathAxisIterator.cs
- COM2IDispatchConverter.cs
- ViewSimplifier.cs
- DataErrorValidationRule.cs
- XDeferredAxisSource.cs
- __FastResourceComparer.cs
- AppDomainFactory.cs
- unitconverter.cs
- HostUtils.cs
- Image.cs
- TdsParser.cs
- DragDeltaEventArgs.cs
- FormsAuthenticationTicket.cs
- ListManagerBindingsCollection.cs
- OracleCommand.cs
- DataBindingCollection.cs