Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / AppModel / RequestStatusBarUpdateEventArgs.cs / 1305600 / RequestStatusBarUpdateEventArgs.cs
//----------------------------------------------------------------------------
// File: RequestStatusBarUpdateEventArgs.cs
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//---------------------------------------------------------------------------
using System;
using System.Net;
using System.Windows;
using MS.Internal.Utility;
using System.Security;
namespace MS.Internal.AppModel
{
internal sealed class RequestSetStatusBarEventArgs : RoutedEventArgs
{
///
/// Text that will be set on the status bar.
///
///
/// CriticalDataForSet - Arbitrary changes to the status bar text could open up for spoofing attacks.
///
private SecurityCriticalDataForSet _text;
///
/// Creates a RequestSetStatusBarEventArgs based on a specified string.
///
/// Text that will be set on the status bar.
///
/// Critical - Sets the status bar text; could open up for spoofing attacks.
///
[SecurityCritical]
internal RequestSetStatusBarEventArgs(string text)
: base()
{
_text.Value = text;
base.RoutedEvent = System.Windows.Documents.Hyperlink.RequestSetStatusBarEvent;
}
///
/// Creates a RequestSetStatusBarEventArgs based on a specified URI.
///
/// URI that will be set on the status bar after appropriate conversion to text. If null, the status bar will be cleared.
///
/// Critical - Sets the status bar text; could open up for spoofing attacks.
///
[SecurityCritical]
internal RequestSetStatusBarEventArgs(Uri targetUri)
: base()
{
if (targetUri == null)
_text.Value = String.Empty;
else
_text.Value = BindUriHelper.UriToString(targetUri);
base.RoutedEvent = System.Windows.Documents.Hyperlink.RequestSetStatusBarEvent;
}
///
/// Text that will be set on the status bar.
///
internal string Text
{
get
{
return _text.Value;
}
}
///
/// Request object for clearing the status bar.
///
///
/// Critical - Calls the critical ctor that allows setting the status bar text.
/// TreatAsSafe - We control the input to the status bar (String.Empty).
/// The critical stuff is setting the status bar to a URI; we consider clearing the status bar safe.
///
internal static RequestSetStatusBarEventArgs Clear
{
[SecurityCritical, SecurityTreatAsSafe]
get
{
return new RequestSetStatusBarEventArgs(String.Empty);
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//----------------------------------------------------------------------------
// File: RequestStatusBarUpdateEventArgs.cs
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//---------------------------------------------------------------------------
using System;
using System.Net;
using System.Windows;
using MS.Internal.Utility;
using System.Security;
namespace MS.Internal.AppModel
{
internal sealed class RequestSetStatusBarEventArgs : RoutedEventArgs
{
///
/// Text that will be set on the status bar.
///
///
/// CriticalDataForSet - Arbitrary changes to the status bar text could open up for spoofing attacks.
///
private SecurityCriticalDataForSet _text;
///
/// Creates a RequestSetStatusBarEventArgs based on a specified string.
///
/// Text that will be set on the status bar.
///
/// Critical - Sets the status bar text; could open up for spoofing attacks.
///
[SecurityCritical]
internal RequestSetStatusBarEventArgs(string text)
: base()
{
_text.Value = text;
base.RoutedEvent = System.Windows.Documents.Hyperlink.RequestSetStatusBarEvent;
}
///
/// Creates a RequestSetStatusBarEventArgs based on a specified URI.
///
/// URI that will be set on the status bar after appropriate conversion to text. If null, the status bar will be cleared.
///
/// Critical - Sets the status bar text; could open up for spoofing attacks.
///
[SecurityCritical]
internal RequestSetStatusBarEventArgs(Uri targetUri)
: base()
{
if (targetUri == null)
_text.Value = String.Empty;
else
_text.Value = BindUriHelper.UriToString(targetUri);
base.RoutedEvent = System.Windows.Documents.Hyperlink.RequestSetStatusBarEvent;
}
///
/// Text that will be set on the status bar.
///
internal string Text
{
get
{
return _text.Value;
}
}
///
/// Request object for clearing the status bar.
///
///
/// Critical - Calls the critical ctor that allows setting the status bar text.
/// TreatAsSafe - We control the input to the status bar (String.Empty).
/// The critical stuff is setting the status bar to a URI; we consider clearing the status bar safe.
///
internal static RequestSetStatusBarEventArgs Clear
{
[SecurityCritical, SecurityTreatAsSafe]
get
{
return new RequestSetStatusBarEventArgs(String.Empty);
}
}
}
}
// 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
- SessionEndingCancelEventArgs.cs
- XsltCompileContext.cs
- ApplicationId.cs
- XamlFrame.cs
- TrackingQueryElement.cs
- BindingMemberInfo.cs
- SqlDataReader.cs
- GrabHandleGlyph.cs
- CustomLineCap.cs
- EFTableProvider.cs
- WinInetCache.cs
- XmlUrlEditor.cs
- CryptoHandle.cs
- PaintEvent.cs
- DivideByZeroException.cs
- DelayedRegex.cs
- TextEmbeddedObject.cs
- TableDetailsRow.cs
- AnonymousIdentificationSection.cs
- EventLogInformation.cs
- DependencyObjectType.cs
- DataGridViewCellParsingEventArgs.cs
- SimpleMailWebEventProvider.cs
- HttpRuntimeSection.cs
- PropertyOverridesDialog.cs
- HttpModuleAction.cs
- DataRecordObjectView.cs
- WinFormsSpinner.cs
- DataListComponentEditor.cs
- DetailsView.cs
- GridViewRowEventArgs.cs
- SecurityDescriptor.cs
- PrincipalPermission.cs
- ValidationErrorCollection.cs
- Label.cs
- BinaryCommonClasses.cs
- ToolStripDropDownClosedEventArgs.cs
- ToolStripOverflow.cs
- LinqDataSourceInsertEventArgs.cs
- DependencyObject.cs
- DispatcherTimer.cs
- HwndMouseInputProvider.cs
- DataGridRow.cs
- codemethodreferenceexpression.cs
- DataTransferEventArgs.cs
- EncryptedReference.cs
- EqualityComparer.cs
- LockedBorderGlyph.cs
- ChineseLunisolarCalendar.cs
- RadioButtonBaseAdapter.cs
- DSASignatureDeformatter.cs
- ClickablePoint.cs
- SessionState.cs
- PseudoWebRequest.cs
- XmlSchemaSimpleType.cs
- ExpressionsCollectionEditor.cs
- SynchronizationLockException.cs
- XmlSerializerFactory.cs
- EntityTransaction.cs
- WindowsToolbar.cs
- _ConnectStream.cs
- QilFunction.cs
- Privilege.cs
- CallSiteHelpers.cs
- CodeCommentStatement.cs
- ResourceIDHelper.cs
- EndpointAddressMessageFilterTable.cs
- XslTransform.cs
- PTProvider.cs
- HttpHandlersSection.cs
- XmlSerializationWriter.cs
- AutoGeneratedField.cs
- OracleNumber.cs
- MutableAssemblyCacheEntry.cs
- TextParagraphView.cs
- FileEnumerator.cs
- Transactions.cs
- FrameAutomationPeer.cs
- EditorPartChrome.cs
- Size.cs
- TimeoutTimer.cs
- DataGridViewRowCollection.cs
- TypeDescriptionProviderAttribute.cs
- DoubleCollectionValueSerializer.cs
- OAVariantLib.cs
- TCEAdapterGenerator.cs
- ExpressionBuilder.cs
- LogicalExpressionEditor.cs
- WorkflowOperationBehavior.cs
- Content.cs
- BinaryReader.cs
- FormViewCommandEventArgs.cs
- JoinElimination.cs
- AuthorizationContext.cs
- XmlReaderSettings.cs
- Configuration.cs
- DocumentPage.cs
- ScriptReference.cs
- IItemContainerGenerator.cs
- LoadItemsEventArgs.cs