Microsoft.CSharp.RuntimeBinder.RuntimeBinder.CreateProperty C# (CSharp) Method

CreateProperty() private method

private CreateProperty ( SymWithType swt, EXPR callingObject, BindingFlag flags ) : EXPR
swt Microsoft.CSharp.RuntimeBinder.Semantics.SymWithType
callingObject Microsoft.CSharp.RuntimeBinder.Semantics.EXPR
flags BindingFlag
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPR
        private EXPR CreateProperty(
            SymWithType swt,
            EXPR callingObject,
            BindingFlag flags)
        {
            // For a property, we simply create the EXPRPROP for the thing, call the
            // expression tree rewriter, rewrite it, and send it on its way.

            PropertySymbol property = swt.Prop();
            AggregateType propertyType = swt.GetType();
            PropWithType pwt = new PropWithType(property, propertyType);
            EXPRMEMGRP pMemGroup = CreateMemberGroupEXPR(property.name.Text, null, callingObject, SYMKIND.SK_PropertySymbol);

            return _binder.BindToProperty(// For a static property instance, don't set the object.
                    callingObject.isCLASS() ? null : callingObject, pwt, flags, null, null, pMemGroup);
        }