Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / xsp / System / Web / UI / UrlPropertyAttribute.cs / 1 / UrlPropertyAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Security.Permissions; using System.Web.Util; // An UrlPropertyAttribute metadata attribute can be applied to string // properties that contain URL values. // This can be used to identify URLs which allows design-time functionality and runtime // functionality to do interesting things with the property values. [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class UrlPropertyAttribute : Attribute { private string _filter; // Used to mark a property as an URL. public UrlPropertyAttribute() : this("*.*") { } // Used to mark a property as an URL. In addition, the type of files allowed // can be specified. This can be used at design-time to customize the URL picker. public UrlPropertyAttribute(string filter) { if(filter == null) { _filter = "*.*"; } else { _filter = filter; } } // The file filter associated with the URL property. This takes // the form of a file filter string typically used with Open File // dialogs. The default is *.*, so all file types can be chosen. public string Filter { get { return _filter; } } public override int GetHashCode() { return Filter.GetHashCode(); } public override bool Equals(object obj) { if (obj == this) { return true; } UrlPropertyAttribute other = obj as UrlPropertyAttribute; if (other != null) { return Filter.Equals(other.Filter); } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Security.Permissions; using System.Web.Util; // An UrlPropertyAttribute metadata attribute can be applied to string // properties that contain URL values. // This can be used to identify URLs which allows design-time functionality and runtime // functionality to do interesting things with the property values. [AttributeUsage(AttributeTargets.Property)] [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class UrlPropertyAttribute : Attribute { private string _filter; // Used to mark a property as an URL. public UrlPropertyAttribute() : this("*.*") { } // Used to mark a property as an URL. In addition, the type of files allowed // can be specified. This can be used at design-time to customize the URL picker. public UrlPropertyAttribute(string filter) { if(filter == null) { _filter = "*.*"; } else { _filter = filter; } } // The file filter associated with the URL property. This takes // the form of a file filter string typically used with Open File // dialogs. The default is *.*, so all file types can be chosen. public string Filter { get { return _filter; } } public override int GetHashCode() { return Filter.GetHashCode(); } public override bool Equals(object obj) { if (obj == this) { return true; } UrlPropertyAttribute other = obj as UrlPropertyAttribute; if (other != null) { return Filter.Equals(other.Filter); } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Inflater.cs
- DurableInstance.cs
- ActivityXRefConverter.cs
- DocumentOutline.cs
- ReferentialConstraint.cs
- EmptyEnumerator.cs
- CurrentChangingEventArgs.cs
- Cursor.cs
- ArraySubsetEnumerator.cs
- FunctionImportElement.cs
- CompilerHelpers.cs
- PresentationAppDomainManager.cs
- GeneralTransformGroup.cs
- DBSqlParser.cs
- CompositeActivityDesigner.cs
- AccessibleObject.cs
- IpcPort.cs
- SimpleExpression.cs
- StreamingContext.cs
- FileSystemEventArgs.cs
- TypeConverterHelper.cs
- StorageTypeMapping.cs
- AnimationException.cs
- Delegate.cs
- Canvas.cs
- ClientClassGenerator.cs
- CreateParams.cs
- BamlResourceContent.cs
- ToolZone.cs
- AlgoModule.cs
- DBSchemaTable.cs
- AssignDesigner.xaml.cs
- ThreadStartException.cs
- Model3DCollection.cs
- WeakReference.cs
- DoubleLinkListEnumerator.cs
- MultiDataTrigger.cs
- LookupNode.cs
- ControlIdConverter.cs
- FileVersionInfo.cs
- TaskFormBase.cs
- FixedTextContainer.cs
- XmlQualifiedNameTest.cs
- OracleRowUpdatingEventArgs.cs
- TextContainer.cs
- WorkflowQueue.cs
- NonVisualControlAttribute.cs
- FieldBuilder.cs
- SQLGuid.cs
- XsltFunctions.cs
- DataReceivedEventArgs.cs
- TextBoxBase.cs
- MessageQueueTransaction.cs
- XmlDataLoader.cs
- FormatStringEditor.cs
- XmlDataProvider.cs
- Config.cs
- NotifyInputEventArgs.cs
- WinEventTracker.cs
- CodeMethodReturnStatement.cs
- MetadataArtifactLoaderResource.cs
- SoapReflectionImporter.cs
- Double.cs
- TrustManager.cs
- DecimalFormatter.cs
- FormViewInsertEventArgs.cs
- SQLCharsStorage.cs
- RangeValidator.cs
- GeneratedContractType.cs
- SecondaryViewProvider.cs
- MimeBasePart.cs
- PointLightBase.cs
- Vector3DCollectionConverter.cs
- DispatcherSynchronizationContext.cs
- FactoryRecord.cs
- StoreItemCollection.Loader.cs
- MembershipUser.cs
- EncodingNLS.cs
- HostSecurityManager.cs
- ArrayExtension.cs
- RootBrowserWindowAutomationPeer.cs
- DataColumnMapping.cs
- DefaultSerializationProviderAttribute.cs
- RotateTransform.cs
- ToggleButton.cs
- KnownBoxes.cs
- NamespaceEmitter.cs
- ScrollBarRenderer.cs
- DataGridToolTip.cs
- HostProtectionPermission.cs
- WebBaseEventKeyComparer.cs
- NativeObjectSecurity.cs
- SynchronizedChannelCollection.cs
- GridViewColumnCollectionChangedEventArgs.cs
- SqlCommandBuilder.cs
- HitTestResult.cs
- RegexCapture.cs
- GifBitmapDecoder.cs
- TdsParser.cs
- Select.cs