Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / System / data / design / TypedRowHandler.cs / 1 / TypedRowHandler.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;
using System.Reflection;
internal sealed class TypedRowHandler {
private TypedDataSourceCodeGenerator codeGenerator = null;
private DesignTableCollection tables = null;
private TypedRowGenerator rowGenerator = null;
internal TypedRowHandler(TypedDataSourceCodeGenerator codeGenerator, DesignTableCollection tables) {
this.codeGenerator = codeGenerator;
this.tables = tables;
this.rowGenerator = new TypedRowGenerator(codeGenerator);
}
internal TypedRowGenerator RowGenerator {
get {
return rowGenerator;
}
}
internal void AddTypedRowEvents(CodeTypeDeclaration dataTableClass, string tableName) {
DesignTable designTable = codeGenerator.TableHandler.Tables[tableName];
string rowClassName = designTable.GeneratorRowClassName;
string rowEventHandlerName = designTable.GeneratorRowEvHandlerName;
dataTableClass.Members.Add(
CodeGenHelper.EventDecl(
rowEventHandlerName,
designTable.GeneratorRowChangingName
)
);
dataTableClass.Members.Add(
CodeGenHelper.EventDecl(
rowEventHandlerName,
designTable.GeneratorRowChangedName
)
);
dataTableClass.Members.Add(
CodeGenHelper.EventDecl(
rowEventHandlerName,
designTable.GeneratorRowDeletingName
)
);
dataTableClass.Members.Add(
CodeGenHelper.EventDecl(
rowEventHandlerName,
designTable.GeneratorRowDeletedName
)
);
}
internal void AddTypedRows(CodeTypeDeclaration dataSourceClass) {
rowGenerator.GenerateRows(dataSourceClass);
}
internal void AddTypedRowEventHandlers(CodeTypeDeclaration dataSourceClass) {
rowGenerator.GenerateTypedRowEventHandlers(dataSourceClass);
}
internal void AddTypedRowEventArgs(CodeTypeDeclaration dataSourceClass) {
rowGenerator.GenerateTypedRowEventArgs(dataSourceClass);
}
}
}
// 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
- SqlBinder.cs
- TextLine.cs
- RoutedPropertyChangedEventArgs.cs
- XPathSelfQuery.cs
- PostBackOptions.cs
- Brush.cs
- Activity.cs
- DataKey.cs
- sapiproxy.cs
- WebPageTraceListener.cs
- LingerOption.cs
- OleDbParameterCollection.cs
- BitSet.cs
- SystemTcpStatistics.cs
- XmlUtf8RawTextWriter.cs
- ProviderBase.cs
- XmlDictionaryString.cs
- BaseComponentEditor.cs
- ParameterReplacerVisitor.cs
- EmbeddedMailObject.cs
- ColorConvertedBitmap.cs
- baseaxisquery.cs
- UpdateRecord.cs
- ZipIOLocalFileBlock.cs
- XmlSerializerVersionAttribute.cs
- WebResourceUtil.cs
- DodSequenceMerge.cs
- HtmlElementCollection.cs
- EntityStoreSchemaFilterEntry.cs
- PathSegment.cs
- TimeBoundedCache.cs
- UDPClient.cs
- ChangeProcessor.cs
- StatusBar.cs
- InheritanceService.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- CodeTypeReferenceSerializer.cs
- ReliableChannelBinder.cs
- ViewBase.cs
- PtsHelper.cs
- LogLogRecord.cs
- WebInvokeAttribute.cs
- NestedContainer.cs
- ProviderSettingsCollection.cs
- DesignTimeParseData.cs
- ToolStripItem.cs
- DecodeHelper.cs
- XpsFilter.cs
- RadioButton.cs
- WebPartTransformerCollection.cs
- SecurityUtils.cs
- HttpConfigurationContext.cs
- _TLSstream.cs
- XmlCodeExporter.cs
- ConfigurationElementProperty.cs
- GPRECT.cs
- BaseDataBoundControl.cs
- Listener.cs
- ExtensibleSyndicationObject.cs
- tooltip.cs
- DayRenderEvent.cs
- _BufferOffsetSize.cs
- IFlowDocumentViewer.cs
- ClientSettingsStore.cs
- HtmlToClrEventProxy.cs
- ContentValidator.cs
- WebHeaderCollection.cs
- DataGridView.cs
- LateBoundChannelParameterCollection.cs
- ButtonAutomationPeer.cs
- WorkflowInstance.cs
- ServiceContractAttribute.cs
- GraphicsPathIterator.cs
- FormsAuthenticationUser.cs
- ExceptionUtil.cs
- EllipseGeometry.cs
- ObjectCloneHelper.cs
- OleDbEnumerator.cs
- IntPtr.cs
- UnsafeNativeMethods.cs
- MailAddressCollection.cs
- NetworkInformationException.cs
- PtsHelper.cs
- ConnectionOrientedTransportChannelListener.cs
- HttpGetProtocolImporter.cs
- ResizeGrip.cs
- HtmlGenericControl.cs
- DataGridViewUtilities.cs
- ComNativeDescriptor.cs
- ActivityExecutionWorkItem.cs
- HtmlTableCell.cs
- ChannelEndpointElementCollection.cs
- MessageVersion.cs
- HighContrastHelper.cs
- DataControlFieldCollection.cs
- DataBinder.cs
- RootBuilder.cs
- ArcSegment.cs
- DiscreteKeyFrames.cs
- StateMachineAction.cs