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
- Int16AnimationBase.cs
- BindingCompleteEventArgs.cs
- TextRange.cs
- InputGestureCollection.cs
- ExtenderProviderService.cs
- OperationParameterInfoCollection.cs
- UpdateManifestForBrowserApplication.cs
- ObjectDataSourceSelectingEventArgs.cs
- SecurityPolicySection.cs
- EffectiveValueEntry.cs
- GPRECTF.cs
- AdvancedBindingPropertyDescriptor.cs
- SliderAutomationPeer.cs
- QueryBranchOp.cs
- AdapterUtil.cs
- ScriptIgnoreAttribute.cs
- OracleCommand.cs
- ListDependantCardsRequest.cs
- _Events.cs
- ServiceObjectContainer.cs
- TrackBarRenderer.cs
- DbFunctionCommandTree.cs
- SetIndexBinder.cs
- remotingproxy.cs
- SQLDecimal.cs
- ScalarConstant.cs
- IUnknownConstantAttribute.cs
- DataGridItemEventArgs.cs
- ResXResourceWriter.cs
- ProcessHostFactoryHelper.cs
- MonitoringDescriptionAttribute.cs
- SpeechEvent.cs
- EventDescriptorCollection.cs
- X509CertificateCollection.cs
- ZipIOCentralDirectoryFileHeader.cs
- UpdateProgress.cs
- OpenTypeLayout.cs
- CapiNative.cs
- PageThemeBuildProvider.cs
- HandleRef.cs
- SegmentTree.cs
- Parser.cs
- ProxyGenerator.cs
- SchemaMapping.cs
- FunctionNode.cs
- CommonRemoteMemoryBlock.cs
- InertiaTranslationBehavior.cs
- WebPartHelpVerb.cs
- DuplicateWaitObjectException.cs
- DataGridRow.cs
- PolyBezierSegment.cs
- FunctionDescription.cs
- AspNetHostingPermission.cs
- HandledEventArgs.cs
- SeparatorAutomationPeer.cs
- SHA256Managed.cs
- WriteTimeStream.cs
- SoapAttributes.cs
- AllMembershipCondition.cs
- InvokeGenerator.cs
- OleDbConnection.cs
- LocatorPartList.cs
- CodeTypeDeclaration.cs
- DocumentReference.cs
- CalendarData.cs
- BitVector32.cs
- DependencyObjectType.cs
- AppSettingsReader.cs
- FieldNameLookup.cs
- ColorTranslator.cs
- XmlSecureResolver.cs
- HtmlButton.cs
- MetadataReference.cs
- XamlTypeMapperSchemaContext.cs
- LoginView.cs
- TextPattern.cs
- Rect3D.cs
- CodeVariableDeclarationStatement.cs
- _NestedMultipleAsyncResult.cs
- CodeTypeDeclaration.cs
- ValidationHelper.cs
- ObjectSet.cs
- ArgumentException.cs
- MinimizableAttributeTypeConverter.cs
- BinaryExpression.cs
- safePerfProviderHandle.cs
- ProcessModule.cs
- LocalizationComments.cs
- MailWriter.cs
- FrameworkElementAutomationPeer.cs
- DocumentPageTextView.cs
- HistoryEventArgs.cs
- JavaScriptSerializer.cs
- IconHelper.cs
- GridSplitterAutomationPeer.cs
- CallbackValidatorAttribute.cs
- ControlBuilderAttribute.cs
- DocumentCollection.cs
- WarningException.cs
- FrameworkPropertyMetadata.cs