Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / System / data / design / RelationHandler.cs / 2 / RelationHandler.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All Rights Reserved. // Information Contained Herein is Proprietary and Confidential. // //----------------------------------------------------------------------------- namespace System.Data.Design { using System; using System.CodeDom; using System.Collections; using System.ComponentModel; using System.Data; internal sealed class RelationHandler { private TypedDataSourceCodeGenerator codeGenerator = null; private DesignRelationCollection relations = null; internal RelationHandler(TypedDataSourceCodeGenerator codeGenerator, DesignRelationCollection relations) { this.codeGenerator = codeGenerator; this.relations = relations; } internal DesignRelationCollection Relations { get { return relations; } } internal void AddPrivateVars(CodeTypeDeclaration dataSourceClass) { if(dataSourceClass == null) { throw new InternalException("DataSource CodeTypeDeclaration should not be null."); } if( relations == null ) { return; } foreach(DesignRelation relation in relations) { if(relation.DataRelation != null) { //\\ private DataRelationstring relationVariableName = relation.GeneratorRelationVarName; dataSourceClass.Members.Add( CodeGenHelper.FieldDecl(CodeGenHelper.GlobalType(typeof(System.Data.DataRelation)), relationVariableName) ); } } } } } // 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
- FilterQuery.cs
- URL.cs
- SizeAnimationClockResource.cs
- URLAttribute.cs
- AutoResizedEvent.cs
- SchemaTableColumn.cs
- Padding.cs
- Hyperlink.cs
- COMException.cs
- SqlHelper.cs
- ButtonBase.cs
- GPStream.cs
- PropagatorResult.cs
- PasswordPropertyTextAttribute.cs
- OledbConnectionStringbuilder.cs
- MasterPageCodeDomTreeGenerator.cs
- UInt16.cs
- MeshGeometry3D.cs
- FtpRequestCacheValidator.cs
- IdnMapping.cs
- Message.cs
- ObjectQueryProvider.cs
- EntitySetBase.cs
- TextDecorationUnitValidation.cs
- ToolStripLabel.cs
- SharedPersonalizationStateInfo.cs
- IntellisenseTextBox.designer.cs
- StopStoryboard.cs
- MenuItem.cs
- SecurityResources.cs
- RotateTransform3D.cs
- Vector3DKeyFrameCollection.cs
- GroupBox.cs
- XpsFixedDocumentReaderWriter.cs
- NameTable.cs
- ClientData.cs
- PersonalizationDictionary.cs
- PlatformCulture.cs
- Visual3D.cs
- PropertyGrid.cs
- ServiceProviders.cs
- WebSysDescriptionAttribute.cs
- InputBindingCollection.cs
- CharAnimationBase.cs
- DoWhile.cs
- PropertyEmitter.cs
- StatusBarAutomationPeer.cs
- AssociationTypeEmitter.cs
- TemplateBindingExpressionConverter.cs
- SqlRowUpdatingEvent.cs
- SqlLiftIndependentRowExpressions.cs
- ReceiveSecurityHeaderEntry.cs
- KeyTime.cs
- OracleSqlParser.cs
- PrivilegeNotHeldException.cs
- TransactionManager.cs
- QueryOptionExpression.cs
- DataSourceView.cs
- Point3DCollection.cs
- HwndSourceParameters.cs
- GlyphsSerializer.cs
- DbParameterHelper.cs
- SiteMapDataSourceView.cs
- ErrorWrapper.cs
- Overlapped.cs
- DefaultValueMapping.cs
- MsmqSecureHashAlgorithm.cs
- DocumentOrderQuery.cs
- FontDialog.cs
- UIPermission.cs
- StringDictionary.cs
- RadialGradientBrush.cs
- DataGridViewColumnConverter.cs
- CookieParameter.cs
- DataRelationPropertyDescriptor.cs
- SafeNativeMethodsMilCoreApi.cs
- SecurityToken.cs
- UIElement.cs
- NativeRecognizer.cs
- InvokeMethod.cs
- AssemblyBuilder.cs
- Icon.cs
- versioninfo.cs
- MembershipPasswordException.cs
- Axis.cs
- FixUp.cs
- OptimalTextSource.cs
- SQLBytes.cs
- PropertyChangedEventManager.cs
- OdbcRowUpdatingEvent.cs
- Random.cs
- StickyNoteHelper.cs
- ImportCatalogPart.cs
- FilterElement.cs
- OpenTypeCommon.cs
- X509ScopedServiceCertificateElement.cs
- TypeElement.cs
- MessageQueueKey.cs
- KeyboardNavigation.cs
- Brushes.cs