Code:
/ DotNET / DotNET / 8.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
- TimeSpanValidator.cs
- IsolatedStorageException.cs
- CompModSwitches.cs
- HandleExceptionArgs.cs
- JsonEncodingStreamWrapper.cs
- LogLogRecord.cs
- brushes.cs
- DelegatingChannelListener.cs
- LinqMaximalSubtreeNominator.cs
- __Filters.cs
- ScriptServiceAttribute.cs
- XmlArrayItemAttributes.cs
- FixedSOMTextRun.cs
- _StreamFramer.cs
- DataGridViewAutoSizeModeEventArgs.cs
- __ConsoleStream.cs
- TCEAdapterGenerator.cs
- ExtensionFile.cs
- TriggerActionCollection.cs
- Storyboard.cs
- CngKeyBlobFormat.cs
- DiscoveryServiceExtension.cs
- StringAnimationUsingKeyFrames.cs
- Italic.cs
- DocumentSequence.cs
- CultureSpecificStringDictionary.cs
- ThreadAttributes.cs
- ServiceActivationException.cs
- CheckBoxRenderer.cs
- BulletDecorator.cs
- EdmEntityTypeAttribute.cs
- CompositeDispatchFormatter.cs
- Help.cs
- cache.cs
- HttpResponse.cs
- BatchParser.cs
- TableCellCollection.cs
- LocalBuilder.cs
- CfgParser.cs
- BaseDataListActionList.cs
- EventWaitHandle.cs
- Pen.cs
- SapiGrammar.cs
- ProxyWebPartConnectionCollection.cs
- EditorPart.cs
- XsdDuration.cs
- XmlDataProvider.cs
- FloatSumAggregationOperator.cs
- DatagridviewDisplayedBandsData.cs
- CacheDict.cs
- KeyProperty.cs
- ContentType.cs
- EncoderReplacementFallback.cs
- Native.cs
- MemoryPressure.cs
- SqlConnectionHelper.cs
- DbException.cs
- CmsUtils.cs
- FunctionImportElement.cs
- WebPartConnectVerb.cs
- Helper.cs
- MethodExpr.cs
- OdbcCommandBuilder.cs
- RuntimeArgumentHandle.cs
- ToolboxComponentsCreatedEventArgs.cs
- ChannelSinkStacks.cs
- XmlDeclaration.cs
- LocalTransaction.cs
- AggregationMinMaxHelpers.cs
- GregorianCalendarHelper.cs
- BaseCAMarshaler.cs
- IncomingWebResponseContext.cs
- DrawingVisual.cs
- XmlDataLoader.cs
- DataGridViewCellPaintingEventArgs.cs
- MaskedTextBoxDesignerActionList.cs
- OracleCommandBuilder.cs
- infer.cs
- ModelItem.cs
- CompilationRelaxations.cs
- DataServiceBuildProvider.cs
- ValueExpressions.cs
- BitmapEffect.cs
- InertiaTranslationBehavior.cs
- SimpleHandlerBuildProvider.cs
- TextStore.cs
- XmlDocumentType.cs
- RemoveStoryboard.cs
- TextParagraph.cs
- TrackingStringDictionary.cs
- XmlDigitalSignatureProcessor.cs
- ToolboxComponentsCreatingEventArgs.cs
- prompt.cs
- DirtyTextRange.cs
- QualifiedCellIdBoolean.cs
- FormParameter.cs
- AssemblyUtil.cs
- DigestComparer.cs
- SeekableReadStream.cs
- InstanceCompleteException.cs