Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / DataBinding.cs / 1305376 / DataBinding.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Web.UI { using System; using System.ComponentModel; using System.ComponentModel.Design; using System.Data; using System.Globalization; using System.Security.Permissions; using System.Web.Util; ////// public sealed class DataBinding { private string propertyName; private Type propertyType; private string expression; ///Enables RAD designers to create data binding expressions /// at design time. This class cannot be inherited. ////// public DataBinding(string propertyName, Type propertyType, string expression) { this.propertyName = propertyName; this.propertyType = propertyType; this.expression = expression; } ///Initializes a new instance of the ///class. /// public string Expression { get { return expression; } set { Debug.Assert((value != null) && (value.Length != 0), "Invalid expression"); expression = value; } } ///Indicates the data binding expression to be evaluated. ////// public string PropertyName { get { return propertyName; } } ///Indicates the name of the property that is to be data bound against. This /// property is read-only. ////// public Type PropertyType { get { return propertyType; } } ///Indicates the type of the data bound property. This property is /// read-only. ////// DataBinding objects are placed in a hashtable representing the collection /// of bindings on a control. There can only be one binding/property, so /// the hashcode computation should match the Equals implementation and only /// take the property name into account. /// public override int GetHashCode() { return propertyName.ToLower(CultureInfo.InvariantCulture).GetHashCode(); } ////// public override bool Equals(object obj) { if ((obj != null) && (obj is DataBinding)) { DataBinding binding = (DataBinding)obj; return StringUtil.EqualsIgnoreCase(propertyName, binding.PropertyName); } 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.ComponentModel.Design; using System.Data; using System.Globalization; using System.Security.Permissions; using System.Web.Util; ////// public sealed class DataBinding { private string propertyName; private Type propertyType; private string expression; ///Enables RAD designers to create data binding expressions /// at design time. This class cannot be inherited. ////// public DataBinding(string propertyName, Type propertyType, string expression) { this.propertyName = propertyName; this.propertyType = propertyType; this.expression = expression; } ///Initializes a new instance of the ///class. /// public string Expression { get { return expression; } set { Debug.Assert((value != null) && (value.Length != 0), "Invalid expression"); expression = value; } } ///Indicates the data binding expression to be evaluated. ////// public string PropertyName { get { return propertyName; } } ///Indicates the name of the property that is to be data bound against. This /// property is read-only. ////// public Type PropertyType { get { return propertyType; } } ///Indicates the type of the data bound property. This property is /// read-only. ////// DataBinding objects are placed in a hashtable representing the collection /// of bindings on a control. There can only be one binding/property, so /// the hashcode computation should match the Equals implementation and only /// take the property name into account. /// public override int GetHashCode() { return propertyName.ToLower(CultureInfo.InvariantCulture).GetHashCode(); } ////// public override bool Equals(object obj) { if ((obj != null) && (obj is DataBinding)) { DataBinding binding = (DataBinding)obj; return StringUtil.EqualsIgnoreCase(propertyName, binding.PropertyName); } 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
- XamlFilter.cs
- WebPartMenu.cs
- SpecialFolderEnumConverter.cs
- AudioBase.cs
- BaseHashHelper.cs
- RightsManagementInformation.cs
- InitiatorSessionSymmetricTransportSecurityProtocol.cs
- SystemIPv4InterfaceProperties.cs
- SQLGuidStorage.cs
- WebPartTransformer.cs
- Vector3DAnimation.cs
- SqlIdentifier.cs
- RandomNumberGenerator.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- RightsManagementEncryptionTransform.cs
- RegexRunner.cs
- ControlDesigner.cs
- StreamReader.cs
- ResourceLoader.cs
- ImmutableObjectAttribute.cs
- DocumentGridContextMenu.cs
- DataExpression.cs
- OdbcCommand.cs
- ObjectKeyFrameCollection.cs
- SystemColors.cs
- DynamicMethod.cs
- LocalizableAttribute.cs
- PreservationFileReader.cs
- FormsAuthenticationTicket.cs
- DrawingGroup.cs
- ListMarkerLine.cs
- CookielessData.cs
- DynamicQueryableWrapper.cs
- mongolianshape.cs
- GlyphCache.cs
- PaintEvent.cs
- SyndicationSerializer.cs
- _ListenerAsyncResult.cs
- SchemaImporter.cs
- StringSource.cs
- SamlAdvice.cs
- SessionState.cs
- BrowsableAttribute.cs
- HMACRIPEMD160.cs
- ScriptResourceHandler.cs
- DecimalAnimationBase.cs
- ItemsChangedEventArgs.cs
- BitmapData.cs
- DateTimeConstantAttribute.cs
- Grid.cs
- SharedPersonalizationStateInfo.cs
- PeerNearMe.cs
- InternalTypeHelper.cs
- WebPartVerbCollection.cs
- CutCopyPasteHelper.cs
- PaperSource.cs
- Metadata.cs
- HealthMonitoringSection.cs
- BindingMemberInfo.cs
- EventSinkActivityDesigner.cs
- DbSetClause.cs
- ParallelSeparator.xaml.cs
- PriorityQueue.cs
- FreeFormDragDropManager.cs
- LinearGradientBrush.cs
- Signature.cs
- SatelliteContractVersionAttribute.cs
- CachedBitmap.cs
- WebContext.cs
- PixelShader.cs
- HttpCacheParams.cs
- ContextMenuService.cs
- ReadOnlyDataSource.cs
- FullTextState.cs
- BevelBitmapEffect.cs
- IisNotInstalledException.cs
- ExpressionPrefixAttribute.cs
- DrawingGroup.cs
- AdRotator.cs
- SplitterCancelEvent.cs
- Soap12ProtocolReflector.cs
- WebPartConnectionsCancelVerb.cs
- TimeZoneNotFoundException.cs
- IdentityManager.cs
- XmlDownloadManager.cs
- SafeLocalMemHandle.cs
- DiscardableAttribute.cs
- PreviewPageInfo.cs
- ToolStripDropDownItem.cs
- ClientSettingsProvider.cs
- CallbackValidator.cs
- CopyNodeSetAction.cs
- PageAsyncTask.cs
- NetworkInterface.cs
- NamespaceEmitter.cs
- InfoCardMasterKey.cs
- __Error.cs
- OpenTypeLayoutCache.cs
- TemplateControl.cs
- LicenseException.cs