Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Shared / MS / Internal / commands / CommandLibraryHelper.cs / 1305600 / CommandLibraryHelper.cs
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: Set of helpers used by all Commands.
//
// History:
// 02/28/2004 : marka - Created
//
//---------------------------------------------------------------------------
using System;
using System.Security;
using System.Security.Permissions;
using System.Windows.Input;
using MS.Internal.PresentationCore; // for FriendAccessAllowed
namespace MS.Internal
{
[FriendAccessAllowed]
internal static class CommandLibraryHelper
{
internal static RoutedUICommand CreateUICommand(string name, Type ownerType, byte commandId, PermissionSet ps)
{
RoutedUICommand routedUICommand;
if (ps != null)
{
routedUICommand = new SecureUICommand(ps, name, ownerType, commandId);
}
else
{
routedUICommand = new RoutedUICommand(name, ownerType, commandId);
}
routedUICommand.AreInputGesturesDelayLoaded = true;
return routedUICommand;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
//
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//
//
// Description: Set of helpers used by all Commands.
//
// History:
// 02/28/2004 : marka - Created
//
//---------------------------------------------------------------------------
using System;
using System.Security;
using System.Security.Permissions;
using System.Windows.Input;
using MS.Internal.PresentationCore; // for FriendAccessAllowed
namespace MS.Internal
{
[FriendAccessAllowed]
internal static class CommandLibraryHelper
{
internal static RoutedUICommand CreateUICommand(string name, Type ownerType, byte commandId, PermissionSet ps)
{
RoutedUICommand routedUICommand;
if (ps != null)
{
routedUICommand = new SecureUICommand(ps, name, ownerType, commandId);
}
else
{
routedUICommand = new RoutedUICommand(name, ownerType, commandId);
}
routedUICommand.AreInputGesturesDelayLoaded = true;
return routedUICommand;
}
}
}
// 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
- PagedDataSource.cs
- SafeRightsManagementSessionHandle.cs
- CaseCqlBlock.cs
- HttpApplication.cs
- WindowVisualStateTracker.cs
- SqlBulkCopy.cs
- GridViewAutoFormat.cs
- TriggerBase.cs
- RemotingException.cs
- SecUtil.cs
- relpropertyhelper.cs
- Label.cs
- HtmlInputRadioButton.cs
- QilUnary.cs
- IChannel.cs
- SQLConvert.cs
- TreeViewBindingsEditor.cs
- FixedSOMImage.cs
- EntityCommandExecutionException.cs
- datacache.cs
- LocatorBase.cs
- HttpCookiesSection.cs
- ConnectionPoolManager.cs
- PixelFormatConverter.cs
- Substitution.cs
- FileCodeGroup.cs
- BufferAllocator.cs
- BitmapCacheBrush.cs
- httpserverutility.cs
- CharUnicodeInfo.cs
- XamlWrappingReader.cs
- WinInetCache.cs
- ZipIOModeEnforcingStream.cs
- AbstractExpressions.cs
- StrongNameIdentityPermission.cs
- SafeMILHandle.cs
- HttpModuleActionCollection.cs
- WebBrowserPermission.cs
- DecoderExceptionFallback.cs
- TypeHelper.cs
- GeometryHitTestParameters.cs
- ZoomPercentageConverter.cs
- entityreference_tresulttype.cs
- InvalidProgramException.cs
- IsolatedStorageException.cs
- CounterSample.cs
- ScriptManagerProxy.cs
- Set.cs
- AnnotationResource.cs
- ForeignConstraint.cs
- DataTemplate.cs
- Int32EqualityComparer.cs
- XPathNavigatorKeyComparer.cs
- RemoteTokenFactory.cs
- BulletChrome.cs
- XmlAttributeProperties.cs
- Win32Native.cs
- DataGridViewComboBoxEditingControl.cs
- StorageRoot.cs
- ApplicationInfo.cs
- SQLBytesStorage.cs
- Compiler.cs
- ContourSegment.cs
- Property.cs
- COM2IPerPropertyBrowsingHandler.cs
- ExternalException.cs
- TextBlock.cs
- ConfigurationManagerHelperFactory.cs
- FixedTextView.cs
- DataContractSet.cs
- AttachedPropertyInfo.cs
- PropertyTabAttribute.cs
- ColorAnimation.cs
- SinglePageViewer.cs
- Assembly.cs
- GradientBrush.cs
- RegistrySecurity.cs
- ContractMethodInfo.cs
- SearchForVirtualItemEventArgs.cs
- XmlBinaryReader.cs
- BamlVersionHeader.cs
- OleDbReferenceCollection.cs
- IntegerValidatorAttribute.cs
- ColorPalette.cs
- DelegateCompletionCallbackWrapper.cs
- TaskHelper.cs
- XhtmlBasicLinkAdapter.cs
- Serializer.cs
- NameObjectCollectionBase.cs
- CursorConverter.cs
- XmlText.cs
- ComPlusThreadInitializer.cs
- JsonReaderDelegator.cs
- ValueUtilsSmi.cs
- StaticSiteMapProvider.cs
- ExtensionSimplifierMarkupObject.cs
- WrappedKeySecurityToken.cs
- FigureHelper.cs
- CompiledELinqQueryState.cs
- MediaElement.cs