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
- RemotingConfigParser.cs
- PageContentAsyncResult.cs
- BamlRecordHelper.cs
- ProviderIncompatibleException.cs
- ActiveXContainer.cs
- ValidatedControlConverter.cs
- FixedPageAutomationPeer.cs
- QueryContinueDragEvent.cs
- StateDesigner.Helpers.cs
- SafeHandles.cs
- Rotation3DAnimationBase.cs
- FileCodeGroup.cs
- RelationshipManager.cs
- AsymmetricSignatureDeformatter.cs
- MediaElementAutomationPeer.cs
- TagPrefixInfo.cs
- DiscoveryReference.cs
- ByteStreamMessageEncoder.cs
- MenuItemStyle.cs
- AuthenticatingEventArgs.cs
- ActivitySurrogateSelector.cs
- ArrangedElementCollection.cs
- ConfigXmlText.cs
- MediaElement.cs
- SerializableTypeCodeDomSerializer.cs
- TdsParserStateObject.cs
- TextParagraphCache.cs
- Literal.cs
- MsmqActivation.cs
- NavigatorInvalidBodyAccessException.cs
- UnmanagedMemoryAccessor.cs
- ToolStripOverflowButton.cs
- METAHEADER.cs
- OdbcEnvironmentHandle.cs
- KeyboardEventArgs.cs
- ACE.cs
- MenuItemBindingCollection.cs
- ParameterSubsegment.cs
- InternalBase.cs
- ViewStateException.cs
- ConfigXmlAttribute.cs
- AttributeProviderAttribute.cs
- AppSecurityManager.cs
- _NtlmClient.cs
- FileLevelControlBuilderAttribute.cs
- SignedPkcs7.cs
- RequiredFieldValidator.cs
- FontWeights.cs
- RoutingTable.cs
- CodeTypeConstructor.cs
- SelectionPatternIdentifiers.cs
- Constants.cs
- PackageDigitalSignature.cs
- DependentList.cs
- ZipIOCentralDirectoryBlock.cs
- XmlSchemaValidationException.cs
- Transform3DCollection.cs
- ResourcePart.cs
- MethodCallTranslator.cs
- GeneralTransform2DTo3DTo2D.cs
- ExceptionAggregator.cs
- TargetPerspective.cs
- DisplayNameAttribute.cs
- MatchAllMessageFilter.cs
- IndexerNameAttribute.cs
- ButtonPopupAdapter.cs
- NodeCounter.cs
- FixedLineResult.cs
- ProcessModelSection.cs
- XmlSchemaSimpleContentExtension.cs
- DbgUtil.cs
- RadioButtonBaseAdapter.cs
- HMACRIPEMD160.cs
- Psha1DerivedKeyGenerator.cs
- ArcSegment.cs
- PolyBezierSegment.cs
- GPRECTF.cs
- SingleAnimationBase.cs
- SrgsElementFactoryCompiler.cs
- BitmapSourceSafeMILHandle.cs
- MetadataFile.cs
- DataPagerFieldItem.cs
- ErrorWrapper.cs
- EntityConnection.cs
- TargetParameterCountException.cs
- XmlSubtreeReader.cs
- TrueReadOnlyCollection.cs
- TextRangeSerialization.cs
- FlowDocument.cs
- ReadOnlyDictionary.cs
- CheckBox.cs
- translator.cs
- AppDomainUnloadedException.cs
- FormViewCommandEventArgs.cs
- autovalidator.cs
- SiteMapDataSourceView.cs
- ToolStripSplitButton.cs
- ScriptingRoleServiceSection.cs
- DivideByZeroException.cs
- XmlSchemaObjectCollection.cs