Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / System / Windows / Input / StagingAreaInputItem.cs / 1 / StagingAreaInputItem.cs
using System; using System.Collections; using System.Security.Permissions; using System.Security; namespace System.Windows.Input { ////// This class encapsulates an input event while it is being /// processed by the input manager. /// ////// This class just provides the dictionary-based storage for /// all of the listeners of the various input manager events. /// public class StagingAreaInputItem { // Only we can make these. internal StagingAreaInputItem(bool isMarker) { _isMarker = isMarker; } // For performace reasons, we try to reuse these event args. // Allow an existing item to be promoted by keeping the existing dictionary. internal void Reset(InputEventArgs input, StagingAreaInputItem promote) { _input = input; if(promote != null && promote._dictionary != null) { // _dictionary = (Hashtable) promote._dictionary.Clone(); } else { if(_dictionary != null) { _dictionary.Clear(); } else { _dictionary = new Hashtable(); } } } ////// Returns the input event. /// ////// Callers must have UIPermission(PermissionState.Unrestricted) to call this API. /// ////// Defense In Depth - even if this leaks out, we demand here. /// public InputEventArgs Input { [UIPermissionAttribute(SecurityAction.LinkDemand,Unrestricted=true)] get {return _input;} } ////// Provides storage for arbitrary data needed during the /// processing of this input event. /// /// /// An arbitrary key for the data. This cannot be null. /// ////// The data previously set for this key, or null. /// public object GetData(object key) { return _dictionary[key]; } ////// Provides storage for arbitrary data needed during the /// processing of this input event. /// /// /// An arbitrary key for the data. This cannot be null. /// /// /// The data to set for this key. This can be null. /// ////// Callers must have UIPermission(PermissionState.Unrestricted) to call this API. /// ////// Defense In Depth - even if this leaks out, we demand here. /// [UIPermissionAttribute(SecurityAction.LinkDemand,Unrestricted=true)] public void SetData(object key, object value) { _dictionary[key] = value; } internal bool IsMarker {get {return _isMarker;}} private bool _isMarker; private InputEventArgs _input; private Hashtable _dictionary; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DoubleConverter.cs
- EntitySqlQueryCacheEntry.cs
- RowCache.cs
- AvTraceFormat.cs
- HandlerBase.cs
- ClientUIRequest.cs
- OracleRowUpdatedEventArgs.cs
- PersonalizationProviderCollection.cs
- PerformanceCounterManager.cs
- ToolStripScrollButton.cs
- XmlSchemaCollection.cs
- CrossAppDomainChannel.cs
- StringCollection.cs
- _ProxyRegBlob.cs
- HttpResponse.cs
- VarRefManager.cs
- AssociationType.cs
- ToolBar.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- AppDomain.cs
- RelatedImageListAttribute.cs
- ITreeGenerator.cs
- _ContextAwareResult.cs
- SqlHelper.cs
- SQlBooleanStorage.cs
- ParameterSubsegment.cs
- SqlConnectionPoolGroupProviderInfo.cs
- InternalDuplexChannelFactory.cs
- TableCell.cs
- SmtpException.cs
- CreateRefExpr.cs
- TemplateKey.cs
- TextFormatter.cs
- BamlResourceContent.cs
- PrivilegeNotHeldException.cs
- WindowsEditBoxRange.cs
- CssClassPropertyAttribute.cs
- HttpStreamXmlDictionaryWriter.cs
- Model3D.cs
- newinstructionaction.cs
- LogArchiveSnapshot.cs
- XmlILStorageConverter.cs
- RangeValidator.cs
- LogEntryUtils.cs
- ClientSettingsProvider.cs
- ViewStateChangedEventArgs.cs
- GeneralTransformCollection.cs
- PropertyChangingEventArgs.cs
- WrapPanel.cs
- TemplateInstanceAttribute.cs
- DataControlFieldCell.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- TransformerInfo.cs
- DataGridViewAccessibleObject.cs
- XmlSchemaDatatype.cs
- MissingFieldException.cs
- StackSpiller.Temps.cs
- FontStyleConverter.cs
- GlobalItem.cs
- LightweightEntityWrapper.cs
- StateDesigner.TransitionInfo.cs
- CodeParameterDeclarationExpression.cs
- DataGridViewCellLinkedList.cs
- RsaSecurityToken.cs
- ImmutableCollection.cs
- BadImageFormatException.cs
- SiteMapProvider.cs
- TableRowCollection.cs
- FunctionQuery.cs
- BaseConfigurationRecord.cs
- SchemaTableColumn.cs
- ObjectMemberMapping.cs
- LineVisual.cs
- SQLDateTimeStorage.cs
- ChannelFactoryRefCache.cs
- XmlResolver.cs
- TextWriter.cs
- TargetParameterCountException.cs
- ByteArrayHelperWithString.cs
- MenuAutomationPeer.cs
- documentsequencetextcontainer.cs
- ListBindableAttribute.cs
- SchemaType.cs
- SamlAuthorityBinding.cs
- CallTemplateAction.cs
- StateManagedCollection.cs
- TextServicesLoader.cs
- EventBuilder.cs
- Win32PrintDialog.cs
- WMIInterop.cs
- Transform3DCollection.cs
- DataGridViewEditingControlShowingEventArgs.cs
- LineMetrics.cs
- TaskExtensions.cs
- RowTypePropertyElement.cs
- AssociationSetEnd.cs
- SqlCaseSimplifier.cs
- TemplateControlParser.cs
- FormViewDeleteEventArgs.cs
- DrawingContext.cs