Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / Microsoft / Scripting / Ast / DefaultExpression.cs / 1305376 / DefaultExpression.cs
/* **************************************************************************** * * Copyright (c) Microsoft Corporation. * * This source code is subject to terms and conditions of the Microsoft Public License. A * copy of the license can be found in the License.html file at the root of this distribution. If * you cannot locate the Microsoft Public License, please send an email to * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound * by the terms of the Microsoft Public License. * * You must not remove this notice, or any other, from this software. * * * ***************************************************************************/ using System.Diagnostics; namespace System.Linq.Expressions { ////// Represents the default value of a type or an empty expression. /// #if !SILVERLIGHT [DebuggerTypeProxy(typeof(Expression.DefaultExpressionProxy))] #endif public sealed class DefaultExpression : Expression { private readonly Type _type; internal DefaultExpression(Type type) { _type = type; } ////// Gets the static type of the expression that this ///represents. /// The public sealed override Type Type { get { return _type; } } ///that represents the static type of the expression. /// Returns the node type of this Expression. Extension nodes should return /// ExpressionType.Extension when overriding this method. /// ///The public sealed override ExpressionType NodeType { get { return ExpressionType.Default; } } ///of the expression. /// Dispatches to the specific visit method for this node type. /// protected internal override Expression Accept(ExpressionVisitor visitor) { return visitor.VisitDefault(this); } } public partial class Expression { ////// Creates an empty expression that has ///type. /// /// A public static DefaultExpression Empty() { return new DefaultExpression(typeof(void)); } ///that has the property equal to /// and the property set to . /// /// Creates a /// Athat has the property set to the specified type. /// to set the property equal to. /// /// A public static DefaultExpression Default(Type type) { if (type == typeof(void)) { return Empty(); } return new DefaultExpression(type); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. /* **************************************************************************** * * Copyright (c) Microsoft Corporation. * * This source code is subject to terms and conditions of the Microsoft Public License. A * copy of the license can be found in the License.html file at the root of this distribution. If * you cannot locate the Microsoft Public License, please send an email to * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound * by the terms of the Microsoft Public License. * * You must not remove this notice, or any other, from this software. * * * ***************************************************************************/ using System.Diagnostics; namespace System.Linq.Expressions { ///that has the property equal to /// and the property set to the specified type. /// /// Represents the default value of a type or an empty expression. /// #if !SILVERLIGHT [DebuggerTypeProxy(typeof(Expression.DefaultExpressionProxy))] #endif public sealed class DefaultExpression : Expression { private readonly Type _type; internal DefaultExpression(Type type) { _type = type; } ////// Gets the static type of the expression that this ///represents. /// The public sealed override Type Type { get { return _type; } } ///that represents the static type of the expression. /// Returns the node type of this Expression. Extension nodes should return /// ExpressionType.Extension when overriding this method. /// ///The public sealed override ExpressionType NodeType { get { return ExpressionType.Default; } } ///of the expression. /// Dispatches to the specific visit method for this node type. /// protected internal override Expression Accept(ExpressionVisitor visitor) { return visitor.VisitDefault(this); } } public partial class Expression { ////// Creates an empty expression that has ///type. /// /// A public static DefaultExpression Empty() { return new DefaultExpression(typeof(void)); } ///that has the property equal to /// and the property set to . /// /// Creates a /// Athat has the property set to the specified type. /// to set the property equal to. /// /// A public static DefaultExpression Default(Type type) { if (type == typeof(void)) { return Empty(); } return new DefaultExpression(type); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.that has the property equal to /// and the property set to the specified type. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataServiceSaveChangesEventArgs.cs
- NotifyCollectionChangedEventArgs.cs
- SafeReversePInvokeHandle.cs
- indexingfiltermarshaler.cs
- OdbcConnectionOpen.cs
- MessageDescriptionCollection.cs
- EventSetter.cs
- HitTestWithPointDrawingContextWalker.cs
- columnmapfactory.cs
- _NegotiateClient.cs
- QuinticEase.cs
- DesignerForm.cs
- safesecurityhelperavalon.cs
- RegexInterpreter.cs
- EntityModelSchemaGenerator.cs
- BindingExpression.cs
- NameTable.cs
- SettingsAttributeDictionary.cs
- UnknownBitmapDecoder.cs
- SHA384.cs
- HtmlShimManager.cs
- ComboBoxAutomationPeer.cs
- SystemWebExtensionsSectionGroup.cs
- ReadOnlyDataSource.cs
- Triplet.cs
- Terminate.cs
- ContextProperty.cs
- AppliedDeviceFiltersDialog.cs
- Base64Stream.cs
- DurableOperationAttribute.cs
- WebScriptServiceHost.cs
- HttpCacheVary.cs
- Propagator.ExtentPlaceholderCreator.cs
- SerializationException.cs
- DataSourceCacheDurationConverter.cs
- DesignerVerbCollection.cs
- ByteStreamGeometryContext.cs
- HMACMD5.cs
- SoapObjectWriter.cs
- ColumnCollection.cs
- TextSegment.cs
- DataGridViewComboBoxColumn.cs
- FileUtil.cs
- IndependentAnimationStorage.cs
- CatalogPart.cs
- BoundField.cs
- DockPattern.cs
- CaseCqlBlock.cs
- LogStore.cs
- PasswordBoxAutomationPeer.cs
- SqlDependency.cs
- KeyGesture.cs
- FixedTextView.cs
- LayoutTable.cs
- SqlBulkCopyColumnMapping.cs
- DisplayMemberTemplateSelector.cs
- TextEvent.cs
- MasterPageCodeDomTreeGenerator.cs
- LongCountAggregationOperator.cs
- GifBitmapDecoder.cs
- ExpressionDumper.cs
- DataSourceCacheDurationConverter.cs
- BamlTreeMap.cs
- HelpEvent.cs
- Parameter.cs
- ToolStripPanel.cs
- TypographyProperties.cs
- FusionWrap.cs
- ToolStripProgressBar.cs
- NumberFormatInfo.cs
- SqlResolver.cs
- Request.cs
- CacheModeConverter.cs
- HttpModulesSection.cs
- HwndSource.cs
- FileFormatException.cs
- InkPresenterAutomationPeer.cs
- TextServicesManager.cs
- SkinIDTypeConverter.cs
- SettingsProviderCollection.cs
- WsatServiceAddress.cs
- SoapHeaders.cs
- Timer.cs
- SoapTypeAttribute.cs
- Config.cs
- XmlAutoDetectWriter.cs
- FilterEventArgs.cs
- SignatureHelper.cs
- XPathSelfQuery.cs
- RegexStringValidatorAttribute.cs
- ExtractedStateEntry.cs
- ContentElement.cs
- CodeDirectiveCollection.cs
- clipboard.cs
- CssClassPropertyAttribute.cs
- XhtmlBasicPanelAdapter.cs
- SoapAttributes.cs
- HMACSHA384.cs
- ButtonChrome.cs
- RawAppCommandInputReport.cs