Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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;
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SafeNativeMethodsCLR.cs
- SecurityTokenTypes.cs
- RegexCaptureCollection.cs
- QilGeneratorEnv.cs
- Line.cs
- NativeMethods.cs
- IdleTimeoutMonitor.cs
- SqlFacetAttribute.cs
- TableItemPatternIdentifiers.cs
- ClonableStack.cs
- TransactedBatchContext.cs
- ProfileManager.cs
- EncodingDataItem.cs
- RuntimeResourceSet.cs
- IntegerCollectionEditor.cs
- Bidi.cs
- ResourcePart.cs
- HttpResponse.cs
- CancelRequestedQuery.cs
- ObjectCacheHost.cs
- CollectionEditor.cs
- InstanceCreationEditor.cs
- HierarchicalDataSourceControl.cs
- DurableDispatcherAddressingFault.cs
- SqlClientPermission.cs
- IPHostEntry.cs
- BufferedOutputAsyncStream.cs
- VariableQuery.cs
- WebPartsSection.cs
- TiffBitmapDecoder.cs
- SafeProcessHandle.cs
- GenericsNotImplementedException.cs
- CodeGroup.cs
- AutomationPatternInfo.cs
- AnimationException.cs
- HttpListenerContext.cs
- AppLevelCompilationSectionCache.cs
- OdbcErrorCollection.cs
- OutputCacheProfile.cs
- VirtualizingStackPanel.cs
- RuntimeEnvironment.cs
- ErrorHandlerModule.cs
- SoapReflector.cs
- CoTaskMemHandle.cs
- ACL.cs
- objectresult_tresulttype.cs
- InputLanguageSource.cs
- SchemaNamespaceManager.cs
- RewritingProcessor.cs
- TableDetailsCollection.cs
- ConvertEvent.cs
- PackageRelationshipCollection.cs
- PackageStore.cs
- WebPartMenuStyle.cs
- SocketException.cs
- xml.cs
- FixedPageAutomationPeer.cs
- AsymmetricCryptoHandle.cs
- XPathNodeIterator.cs
- CodeTypeMember.cs
- TabItem.cs
- Scalars.cs
- StringDictionaryCodeDomSerializer.cs
- BuildProvidersCompiler.cs
- ByteStreamMessageUtility.cs
- DataTableClearEvent.cs
- TypeInfo.cs
- WebPartEditorApplyVerb.cs
- RowsCopiedEventArgs.cs
- DbCommandDefinition.cs
- DesignerOptionService.cs
- QilGeneratorEnv.cs
- AccessControlList.cs
- Label.cs
- StringExpressionSet.cs
- DataGridViewImageCell.cs
- Int64KeyFrameCollection.cs
- ContextQuery.cs
- AttributeEmitter.cs
- ItemCheckedEvent.cs
- UrlMappingsSection.cs
- PrintPreviewGraphics.cs
- PinnedBufferMemoryStream.cs
- ResourceContainer.cs
- SHA512Managed.cs
- XmlAnyElementAttributes.cs
- DataGridViewBand.cs
- XmlRawWriter.cs
- RTLAwareMessageBox.cs
- FrameworkContentElement.cs
- ConfigurationStrings.cs
- DataServiceRequestArgs.cs
- TailPinnedEventArgs.cs
- FixedSOMPage.cs
- ApplicationProxyInternal.cs
- DPCustomTypeDescriptor.cs
- TrustManager.cs
- ToolBar.cs
- ApplicationSettingsBase.cs
- AttachmentCollection.cs