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
- RequestResizeEvent.cs
- BindMarkupExtensionSerializer.cs
- PropertyTabChangedEvent.cs
- SHA1Managed.cs
- BoundsDrawingContextWalker.cs
- WebPartMinimizeVerb.cs
- dtdvalidator.cs
- DocumentOrderQuery.cs
- RegexFCD.cs
- ApplicationServiceManager.cs
- HiddenFieldPageStatePersister.cs
- objectresult_tresulttype.cs
- RenderingBiasValidation.cs
- StringReader.cs
- PropertyGridView.cs
- SQLInt32Storage.cs
- StringAnimationUsingKeyFrames.cs
- ExceptQueryOperator.cs
- ScrollViewerAutomationPeer.cs
- EventMappingSettings.cs
- DoWorkEventArgs.cs
- OdbcConnectionHandle.cs
- ButtonPopupAdapter.cs
- APCustomTypeDescriptor.cs
- Slider.cs
- OleDbParameterCollection.cs
- FormatException.cs
- DirectoryRootQuery.cs
- HostProtectionPermission.cs
- ModelTypeConverter.cs
- ComponentSerializationService.cs
- EventMappingSettings.cs
- DispatcherOperation.cs
- MasterPageBuildProvider.cs
- HtmlControlPersistable.cs
- log.cs
- QualifiedCellIdBoolean.cs
- TypefaceMetricsCache.cs
- KeyEvent.cs
- ParagraphResult.cs
- Quad.cs
- PublisherMembershipCondition.cs
- PropertyFilterAttribute.cs
- MemberDomainMap.cs
- DiagnosticsConfigurationHandler.cs
- TextSimpleMarkerProperties.cs
- XamlWrappingReader.cs
- StackSpiller.Temps.cs
- HitTestWithGeometryDrawingContextWalker.cs
- WebSysDisplayNameAttribute.cs
- ColumnMapTranslator.cs
- WebPartCatalogCloseVerb.cs
- CancellationHandlerDesigner.cs
- LineProperties.cs
- TextSyndicationContent.cs
- MinMaxParagraphWidth.cs
- HTTPNotFoundHandler.cs
- CDSCollectionETWBCLProvider.cs
- Command.cs
- UnhandledExceptionEventArgs.cs
- ComplexPropertyEntry.cs
- XmlSchemaSimpleTypeList.cs
- AssociationType.cs
- BulletChrome.cs
- XmlBinaryReader.cs
- CqlBlock.cs
- TextRange.cs
- ReflectionTypeLoadException.cs
- OLEDB_Util.cs
- HyperLinkStyle.cs
- SpStreamWrapper.cs
- PropertyCondition.cs
- DeviceSpecific.cs
- RoutedEventArgs.cs
- DataGridViewBand.cs
- ETagAttribute.cs
- StatusBarPanelClickEvent.cs
- UnsafeNativeMethods.cs
- ColumnHeader.cs
- TypeConverterMarkupExtension.cs
- TableItemPattern.cs
- CornerRadius.cs
- SymmetricKeyWrap.cs
- DescendentsWalker.cs
- AdRotator.cs
- DesignTimeDataBinding.cs
- OptimisticConcurrencyException.cs
- RawStylusInput.cs
- followingsibling.cs
- TextBlock.cs
- MaskInputRejectedEventArgs.cs
- PreDigestedSignedInfo.cs
- SmtpMail.cs
- ObjectMemberMapping.cs
- Separator.cs
- BaseUriHelper.cs
- RowParagraph.cs
- X509Certificate2.cs
- DocumentPropertiesDialog.cs
- HttpListenerRequest.cs