Code:
/ FX-1434 / FX-1434 / 1.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
- ActivityCodeDomSerializationManager.cs
- X500Name.cs
- MimeMultiPart.cs
- SecurityBindingElement.cs
- PartialCachingControl.cs
- QuaternionIndependentAnimationStorage.cs
- Attributes.cs
- BooleanStorage.cs
- AnnotationHighlightLayer.cs
- RequiredAttributeAttribute.cs
- StructuralType.cs
- UITypeEditor.cs
- WindowsSolidBrush.cs
- WebServiceMethodData.cs
- BitmapPalettes.cs
- GenericIdentity.cs
- ValueQuery.cs
- DataRelationPropertyDescriptor.cs
- ToolStripStatusLabel.cs
- IFormattable.cs
- GenericWebPart.cs
- AutomationIdentifier.cs
- GradientBrush.cs
- DataTablePropertyDescriptor.cs
- CodeTypeDeclarationCollection.cs
- ResourceContainer.cs
- ConfigsHelper.cs
- WebPartVerb.cs
- SqlBulkCopy.cs
- EntityWrapper.cs
- LambdaCompiler.Expressions.cs
- SqlDataSourceWizardForm.cs
- ListChangedEventArgs.cs
- ConstrainedDataObject.cs
- CorrelationHandle.cs
- PathGradientBrush.cs
- ResourceContainer.cs
- ImageCollectionEditor.cs
- LoginUtil.cs
- BaseResourcesBuildProvider.cs
- NetworkAddressChange.cs
- GC.cs
- WpfSharedXamlSchemaContext.cs
- DataObjectCopyingEventArgs.cs
- FixedPosition.cs
- MonitorWrapper.cs
- BufferModeSettings.cs
- WebPartZone.cs
- CheckBoxBaseAdapter.cs
- DataGridParentRows.cs
- ObjectConverter.cs
- FieldNameLookup.cs
- SemanticResultKey.cs
- HTMLTextWriter.cs
- DesignerUtils.cs
- XmlWriterTraceListener.cs
- RequiredFieldValidator.cs
- BindingValueChangedEventArgs.cs
- ValueType.cs
- DurableRuntimeValidator.cs
- XPathNodeHelper.cs
- IndexOutOfRangeException.cs
- NavigationProperty.cs
- DataTableNewRowEvent.cs
- DataGridViewCellValueEventArgs.cs
- DrawListViewItemEventArgs.cs
- EnumerableRowCollectionExtensions.cs
- PropertyBuilder.cs
- TableLayout.cs
- AxisAngleRotation3D.cs
- ListMarkerSourceInfo.cs
- WsdlImporter.cs
- ViewSimplifier.cs
- UInt16Storage.cs
- CaseStatement.cs
- SmiContextFactory.cs
- CapiHashAlgorithm.cs
- BamlRecordReader.cs
- HostingEnvironmentWrapper.cs
- SQLBytes.cs
- unsafenativemethodsother.cs
- ServiceModelExtensionElement.cs
- LoggedException.cs
- StylusPoint.cs
- Helper.cs
- Int16.cs
- TcpWorkerProcess.cs
- CompModSwitches.cs
- WindowsListViewItemCheckBox.cs
- XmlLoader.cs
- PermissionAttributes.cs
- ParseHttpDate.cs
- Internal.cs
- HeaderCollection.cs
- EntityDataSourceViewSchema.cs
- IfAction.cs
- ColumnWidthChangedEvent.cs
- WebRequestModuleElementCollection.cs
- ConditionCollection.cs
- CommandDevice.cs