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
- CustomCategoryAttribute.cs
- _FtpDataStream.cs
- WhitespaceRule.cs
- PageAdapter.cs
- TableItemStyle.cs
- DataGridItem.cs
- WebBrowserHelper.cs
- Stylesheet.cs
- DrawingVisualDrawingContext.cs
- PerformanceCounterPermission.cs
- RootContext.cs
- AssemblySettingAttributes.cs
- SessionStateUtil.cs
- DataGridRelationshipRow.cs
- BufferedGraphics.cs
- BufferedMessageWriter.cs
- Emitter.cs
- ListParaClient.cs
- CodeObjectCreateExpression.cs
- BindingBase.cs
- FontStretchConverter.cs
- ByteConverter.cs
- Environment.cs
- ScrollProperties.cs
- CodeActivityMetadata.cs
- InitializationEventAttribute.cs
- codemethodreferenceexpression.cs
- GuidConverter.cs
- OutputCacheSettings.cs
- TreeViewImageIndexConverter.cs
- SparseMemoryStream.cs
- PenContexts.cs
- IResourceProvider.cs
- BamlLocalizabilityResolver.cs
- AsymmetricKeyExchangeDeformatter.cs
- isolationinterop.cs
- HyperLinkStyle.cs
- TdsParserStaticMethods.cs
- CompoundFileDeflateTransform.cs
- Dispatcher.cs
- SqlCharStream.cs
- securitycriticaldataClass.cs
- CheckBoxField.cs
- CompilationLock.cs
- ItemCollectionEditor.cs
- WCFModelStrings.Designer.cs
- UnitySerializationHolder.cs
- WebPartMinimizeVerb.cs
- PipeStream.cs
- PageCatalogPart.cs
- PageContentCollection.cs
- XmlCDATASection.cs
- Vector.cs
- AsyncPostBackTrigger.cs
- ProofTokenCryptoHandle.cs
- SmtpLoginAuthenticationModule.cs
- SingleKeyFrameCollection.cs
- DataContractAttribute.cs
- HttpCapabilitiesEvaluator.cs
- WinInet.cs
- DataGridViewColumnHeaderCell.cs
- SplitterEvent.cs
- WindowsTokenRoleProvider.cs
- AsymmetricCryptoHandle.cs
- StylusButton.cs
- ObjectViewEntityCollectionData.cs
- HttpChannelHelper.cs
- GlobalEventManager.cs
- NavigationPropertyAccessor.cs
- XmlDocumentType.cs
- documentsequencetextpointer.cs
- XmlDocumentSerializer.cs
- DbExpressionRules.cs
- ParserHooks.cs
- HwndSource.cs
- HostProtectionException.cs
- RequestCache.cs
- NotifyParentPropertyAttribute.cs
- Table.cs
- XmlSecureResolver.cs
- validation.cs
- AssemblyCache.cs
- ListControl.cs
- OletxTransactionManager.cs
- BulletedListEventArgs.cs
- ChangeTracker.cs
- PolicyUtility.cs
- ContactManager.cs
- ValidationError.cs
- EntityDataSourceUtil.cs
- EncodingNLS.cs
- IgnoreDeviceFilterElementCollection.cs
- COM2ComponentEditor.cs
- HostingEnvironment.cs
- ObjectResult.cs
- NativeMethods.cs
- EdmError.cs
- WindowsComboBox.cs
- WebControlParameterProxy.cs
- ComponentDesigner.cs