Exemple #1
0
        private static AbstractExpression ReadAnonymousFunction(IAnonymousFunctionOperation op)
        {
            var context = CodeReaderContext.GetContextOrThrow();

            return(new AnonymousDelegateExpression {
                Body = (BlockStatement)ReadBlock(op.Body),
                Signature = MethodReaderMechanism.ReadSignature(context.CodeModel, op.Symbol)
            });
        }
Exemple #2
0
 public void ReadDeclaration()
 {
     _member = new ConstructorMember {
         DeclaringType = _modelBuilder.TryGetMember <TypeMember>(_symbol.ContainingType),
         Status        = MemberStatus.Incomplete,
         Visibility    = _symbol.GetMemberVisibility(),
         Modifier      = _symbol.GetMemberModifier(),
         Signature     = MethodReaderMechanism.ReadSignature(_modelBuilder, _symbol),
     };
 }
Exemple #3
0
        public void ReadDeclaration()
        {
            _adderReader   = MethodReaderMechanism.CreateAccessorMethodReader(_modelBuilder, _symbol.AddMethod);
            _removerReader = MethodReaderMechanism.CreateAccessorMethodReader(_modelBuilder, _symbol.RemoveMethod);

            _member = new EventMember {
                Name          = _symbol.Name,
                DeclaringType = _modelBuilder.TryGetMember <TypeMember>(_symbol.ContainingType),
                Status        = MemberStatus.Incomplete,
                Visibility    = _symbol.GetMemberVisibility(),
                Modifier      = _symbol.GetMemberModifier(),
                DelegateType  = _modelBuilder.TryGetMember <TypeMember>(_symbol.Type),
            };
        }
Exemple #4
0
        public void ReadDeclaration()
        {
            _getterReader = MethodReaderMechanism.CreateAccessorMethodReader(_modelBuilder, _symbol.GetMethod);
            _setterReader = MethodReaderMechanism.CreateAccessorMethodReader(_modelBuilder, _symbol.SetMethod);

            _member = new PropertyMember {
                Name          = _symbol.Name,
                DeclaringType = _modelBuilder.TryGetMember <TypeMember>(_symbol.ContainingType),
                Status        = MemberStatus.Incomplete,
                Visibility    = _symbol.GetMemberVisibility(),
                Modifier      = _symbol.GetMemberModifier(),
                PropertyType  = _modelBuilder.TryGetMember <TypeMember>(_symbol.Type),
                Getter        = _getterReader?.Member as MethodMember,
                Setter        = _setterReader?.Member as MethodMember
            };
        }
Exemple #5
0
 public void ReadImplementation()
 {
     MethodReaderMechanism.ReadBody(_modelBuilder, _symbol, _member);
 }