Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntityDesign / Design / System / Data / EntityModel / Emitters / Emitter.cs / 1305376 / Emitter.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System; using System.CodeDom; using System.Diagnostics; using System.Data.EntityModel.SchemaObjectModel; namespace System.Data.EntityModel.Emitters { ////// /// internal abstract class Emitter { #region Instance Fields private ClientApiGenerator _generator = null; #endregion #region Static Fields private static CodeExpression _nullExpression = null; private static CodeExpression _thisRef = null; ///Name of property used to get StorageContext from an Entity private const string EntityGetContextPropertyName = "Context"; ///Name of property used to get StorageContext from a StorageSearcher protected const string SearcherGetContextPropertyName = "Context"; #endregion #region Protected Methods ////// /// /// protected Emitter(ClientApiGenerator generator) { Generator = generator; } ////// /// /// ///protected static CodeBinaryOperatorExpression EmitExpressionEqualsNull(CodeExpression expression) { return new CodeBinaryOperatorExpression(expression, CodeBinaryOperatorType.IdentityEquality, NullExpression); } protected static CodeBinaryOperatorExpression EmitExpressionDoesNotEqualNull(CodeExpression expression) { return new CodeBinaryOperatorExpression(expression, CodeBinaryOperatorType.IdentityInequality, NullExpression); } internal static CodeExpression EmitEnumMemberExpression(CodeTypeReference type, string member) { CodeTypeReferenceExpression typeref = new CodeTypeReferenceExpression(type); return new CodeFieldReferenceExpression(typeref, member); } #endregion #region Protected Properties /// /// /// protected static CodeExpression ThisRef { get { if (_thisRef == null) _thisRef = new CodeThisReferenceExpression(); return _thisRef; } } ////// /// internal ClientApiGenerator Generator { get { return _generator; } private set { _generator = value; } } protected TypeReference TypeReference { get { return _generator.TypeReference; } } protected AttributeEmitter AttributeEmitter { get { return _generator.AttributeEmitter; } } protected static CodeExpression NullExpression { get { if (_nullExpression == null) _nullExpression = new CodePrimitiveExpression(null); return _nullExpression; } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AstTree.cs
- TextBoxDesigner.cs
- TextPointerBase.cs
- objectresult_tresulttype.cs
- InternalTypeHelper.cs
- RegexNode.cs
- ErrorEventArgs.cs
- Mappings.cs
- CounterSampleCalculator.cs
- CountAggregationOperator.cs
- CodeCastExpression.cs
- GeneralTransform2DTo3D.cs
- NativeMethods.cs
- counter.cs
- SplineKeyFrames.cs
- DataFormat.cs
- WebBrowserContainer.cs
- MaskedTextBoxDesignerActionList.cs
- GZipStream.cs
- input.cs
- InheritanceRules.cs
- StructuredCompositeActivityDesigner.cs
- NameValueConfigurationElement.cs
- RootBuilder.cs
- SiteMapNode.cs
- TextContainerChangeEventArgs.cs
- InfoCardSymmetricAlgorithm.cs
- FileLoadException.cs
- MetadataHelper.cs
- KeyEventArgs.cs
- MouseButtonEventArgs.cs
- SocketStream.cs
- ConditionCollection.cs
- HttpValueCollection.cs
- ToolStripLocationCancelEventArgs.cs
- UnSafeCharBuffer.cs
- OleDbErrorCollection.cs
- EventRouteFactory.cs
- CombinedGeometry.cs
- JoinTreeSlot.cs
- DebugView.cs
- MetadataCache.cs
- XmlSerializationWriter.cs
- SettingsPropertyIsReadOnlyException.cs
- PageResolution.cs
- EntityCommandExecutionException.cs
- BlobPersonalizationState.cs
- InkPresenterAutomationPeer.cs
- AncillaryOps.cs
- PropertyPathWorker.cs
- DesignerSerializationOptionsAttribute.cs
- FixedSOMImage.cs
- FontUnit.cs
- DesignerVerb.cs
- BooleanExpr.cs
- AppearanceEditorPart.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- CodePageUtils.cs
- IISUnsafeMethods.cs
- DeviceContext.cs
- Rule.cs
- AuthenticationManager.cs
- DictionaryGlobals.cs
- Quad.cs
- Point3DCollection.cs
- SponsorHelper.cs
- TemplatePropertyEntry.cs
- ObjectViewFactory.cs
- baseaxisquery.cs
- EditorBrowsableAttribute.cs
- TypeInfo.cs
- DesignerDataParameter.cs
- XmlSchemaComplexContentExtension.cs
- SqlUserDefinedAggregateAttribute.cs
- ClientTargetSection.cs
- HuffCodec.cs
- CodeConditionStatement.cs
- NativeMethods.cs
- ExceptionRoutedEventArgs.cs
- AccessViolationException.cs
- XamlTemplateSerializer.cs
- ItemsControl.cs
- PolyBezierSegmentFigureLogic.cs
- BitmapFrameDecode.cs
- ObjectHelper.cs
- XPathNodeList.cs
- TransformerInfoCollection.cs
- VersionedStreamOwner.cs
- DiscoveryDocumentReference.cs
- GatewayDefinition.cs
- QueryCreatedEventArgs.cs
- StaticSiteMapProvider.cs
- PagedDataSource.cs
- Registry.cs
- StringBlob.cs
- XmlReflectionMember.cs
- _IPv4Address.cs
- Set.cs
- Catch.cs
- ManagementException.cs