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
- BaseTemplateCodeDomTreeGenerator.cs
- EntitySetBaseCollection.cs
- ExpandCollapsePattern.cs
- IncrementalReadDecoders.cs
- WhitespaceRule.cs
- CodeNamespaceImportCollection.cs
- _NTAuthentication.cs
- RegexCharClass.cs
- EntityDataSourceWrapper.cs
- EntityViewGenerator.cs
- CommunicationException.cs
- GlobalItem.cs
- SQLByteStorage.cs
- HostSecurityManager.cs
- NamespaceCollection.cs
- OracleTimeSpan.cs
- EntityDataSourceSelectedEventArgs.cs
- WebConfigurationFileMap.cs
- NamedObject.cs
- ThreadStaticAttribute.cs
- CompilerErrorCollection.cs
- KnownTypesHelper.cs
- OutputCacheModule.cs
- ManagedFilter.cs
- TableCellCollection.cs
- EntityTypeEmitter.cs
- RelationshipWrapper.cs
- SessionPageStateSection.cs
- DataPagerCommandEventArgs.cs
- Viewport3DAutomationPeer.cs
- DropShadowEffect.cs
- AuthorizationSection.cs
- TempEnvironment.cs
- HttpBrowserCapabilitiesWrapper.cs
- WebCategoryAttribute.cs
- DocumentGridPage.cs
- StructuredTypeInfo.cs
- ListenerElementsCollection.cs
- TemplateBindingExpression.cs
- SafePEFileHandle.cs
- ProfileGroupSettingsCollection.cs
- LowerCaseStringConverter.cs
- DataGridItem.cs
- KeyboardDevice.cs
- TlsnegoTokenProvider.cs
- EntitySetRetriever.cs
- FtpRequestCacheValidator.cs
- SwitchLevelAttribute.cs
- PerformanceCounterCategory.cs
- ZipIOExtraFieldElement.cs
- SHA1.cs
- XsltFunctions.cs
- ImageList.cs
- HttpListenerResponse.cs
- QuotedStringWriteStateInfo.cs
- HtmlInputSubmit.cs
- DoubleAnimation.cs
- Domain.cs
- ClientProxyGenerator.cs
- GenericXmlSecurityToken.cs
- GroupStyle.cs
- SqlDataSourceQueryEditorForm.cs
- TextRunProperties.cs
- CompiledQueryCacheEntry.cs
- Section.cs
- SessionSwitchEventArgs.cs
- XmlSerializationWriter.cs
- RegisteredScript.cs
- OdbcErrorCollection.cs
- ContainerAction.cs
- InvalidPropValue.cs
- InvalidPrinterException.cs
- BamlTreeUpdater.cs
- DbParameterHelper.cs
- PropertySet.cs
- TerminateWorkflow.cs
- WindowsMenu.cs
- ToolboxItem.cs
- Menu.cs
- _CacheStreams.cs
- HierarchicalDataTemplate.cs
- MobileListItem.cs
- CopyNodeSetAction.cs
- TextRangeSerialization.cs
- ScriptBehaviorDescriptor.cs
- CodeConstructor.cs
- WCFBuildProvider.cs
- TileBrush.cs
- Utils.cs
- SqlMetaData.cs
- IndentedWriter.cs
- DivideByZeroException.cs
- UpdateTracker.cs
- BlobPersonalizationState.cs
- CookielessHelper.cs
- ServiceCredentialsSecurityTokenManager.cs
- ProfileSettingsCollection.cs
- DataGridViewColumnConverter.cs
- IODescriptionAttribute.cs
- TableStyle.cs