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
- Point3D.cs
- XPathQueryGenerator.cs
- WindowsClientElement.cs
- RangeContentEnumerator.cs
- HwndTarget.cs
- HttpHandlerActionCollection.cs
- WebPartUtil.cs
- XmlName.cs
- XmlSortKey.cs
- OleDbMetaDataFactory.cs
- ItemList.cs
- SignatureTargetIdManager.cs
- ClientEventManager.cs
- ConnectionsZone.cs
- TypeListConverter.cs
- ModuleBuilder.cs
- DataProtection.cs
- AssociationSetMetadata.cs
- PackageStore.cs
- TypeElementCollection.cs
- Int64Converter.cs
- BindableTemplateBuilder.cs
- TerminatorSinks.cs
- SecurityAlgorithmSuiteConverter.cs
- SourceFileBuildProvider.cs
- EnumValAlphaComparer.cs
- XPathExpr.cs
- TextRunTypographyProperties.cs
- CursorEditor.cs
- InternalConfirm.cs
- BulletChrome.cs
- InvalidPrinterException.cs
- NavigationPropertyEmitter.cs
- XmlDictionaryReaderQuotas.cs
- ToolboxSnapDragDropEventArgs.cs
- System.Data_BID.cs
- PropertyEmitterBase.cs
- CodeThrowExceptionStatement.cs
- VectorKeyFrameCollection.cs
- ForEachAction.cs
- FlowDocumentFormatter.cs
- TransformationRules.cs
- StorageRoot.cs
- MarshalDirectiveException.cs
- DataGridState.cs
- StringValueSerializer.cs
- SchemaEntity.cs
- TCEAdapterGenerator.cs
- XmlSchemaImport.cs
- BookmarkNameHelper.cs
- DataGridViewHitTestInfo.cs
- XmlEntity.cs
- ScriptingRoleServiceSection.cs
- KeyGestureValueSerializer.cs
- X509Certificate2.cs
- XmlElementAttribute.cs
- MarkupObject.cs
- WebMessageEncodingElement.cs
- HtmlTableRowCollection.cs
- HotSpot.cs
- TableLayoutSettings.cs
- DataGridViewRowStateChangedEventArgs.cs
- RijndaelManaged.cs
- SafeLibraryHandle.cs
- Fx.cs
- BitmapCache.cs
- ChangeTracker.cs
- EDesignUtil.cs
- StatusBarDesigner.cs
- ApplicationInterop.cs
- diagnosticsswitches.cs
- Message.cs
- RetrieveVirtualItemEventArgs.cs
- NativeActivityMetadata.cs
- HttpDebugHandler.cs
- XmlSignatureManifest.cs
- COAUTHIDENTITY.cs
- xamlnodes.cs
- ZoomingMessageFilter.cs
- ProcessModule.cs
- entitydatasourceentitysetnameconverter.cs
- HtmlTableRowCollection.cs
- TextChangedEventArgs.cs
- VirtualizedItemPattern.cs
- SqlDependency.cs
- WebBrowsableAttribute.cs
- DockPanel.cs
- XmlDictionaryReader.cs
- KnownIds.cs
- DelegateSerializationHolder.cs
- OSFeature.cs
- Sql8ConformanceChecker.cs
- ToolStripSystemRenderer.cs
- TextRunCache.cs
- XmlNamespaceMappingCollection.cs
- SelectionPattern.cs
- Selector.cs
- StrongNamePublicKeyBlob.cs
- ServiceProviders.cs
- ProfileSettings.cs