Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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; } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ObjectDataProvider.cs
- WebPartConnectionsDisconnectVerb.cs
- CssTextWriter.cs
- SqlTransaction.cs
- QueryGenerator.cs
- ToolstripProfessionalRenderer.cs
- Stream.cs
- WebPermission.cs
- TextLineBreak.cs
- _AutoWebProxyScriptWrapper.cs
- GridEntryCollection.cs
- CodeIndexerExpression.cs
- CompiledQueryCacheKey.cs
- OdbcParameter.cs
- AsymmetricSignatureDeformatter.cs
- Root.cs
- XmlSchemaImporter.cs
- DesignBindingEditor.cs
- CurrentChangingEventArgs.cs
- BaseCodeDomTreeGenerator.cs
- ActivityScheduledQuery.cs
- EventWaitHandleSecurity.cs
- Tuple.cs
- OdbcParameter.cs
- xmlfixedPageInfo.cs
- DesignerActionPropertyItem.cs
- AliasGenerator.cs
- DocumentViewerBaseAutomationPeer.cs
- Int32Storage.cs
- HtmlTernaryTree.cs
- StickyNoteHelper.cs
- UpDownBaseDesigner.cs
- DateTimeUtil.cs
- MultipartContentParser.cs
- EntityDataSourceWizardForm.cs
- SamlAssertionKeyIdentifierClause.cs
- DebugManager.cs
- HttpCacheVaryByContentEncodings.cs
- Rectangle.cs
- TemplateField.cs
- ContentControl.cs
- TimeSpan.cs
- UiaCoreProviderApi.cs
- ConfigurationSectionGroup.cs
- Int32CollectionConverter.cs
- RegexStringValidator.cs
- PerfCounterSection.cs
- DataSourceControlBuilder.cs
- SspiHelper.cs
- OutputCacheSection.cs
- ModelItemDictionaryImpl.cs
- ControlHelper.cs
- SpeechRecognitionEngine.cs
- NonBatchDirectoryCompiler.cs
- ObjectQuery_EntitySqlExtensions.cs
- FormView.cs
- WindowsTokenRoleProvider.cs
- ITextView.cs
- XmlSchemaCollection.cs
- UriTemplateMatch.cs
- Size.cs
- NumericPagerField.cs
- SessionStateContainer.cs
- NotifyIcon.cs
- Themes.cs
- unsafenativemethodsother.cs
- BuildManager.cs
- PlainXmlWriter.cs
- PageSettings.cs
- CharAnimationBase.cs
- SystemDropShadowChrome.cs
- StylusOverProperty.cs
- CharacterMetrics.cs
- ImageInfo.cs
- NameNode.cs
- EntityTypeEmitter.cs
- DayRenderEvent.cs
- TextAutomationPeer.cs
- ContainerUIElement3D.cs
- AssertUtility.cs
- TextElement.cs
- StructuredProperty.cs
- NavigationProperty.cs
- AnnotationMap.cs
- HttpServerUtilityWrapper.cs
- XmlWhitespace.cs
- _ProxyChain.cs
- XsdDateTime.cs
- RefreshPropertiesAttribute.cs
- LocatorBase.cs
- AdapterSwitches.cs
- MeasureData.cs
- CannotUnloadAppDomainException.cs
- EncryptedReference.cs
- Renderer.cs
- PathFigure.cs
- SpeechDetectedEventArgs.cs
- LinearGradientBrush.cs
- KeyboardEventArgs.cs
- arabicshape.cs