Exemplo n.º 1
0
        public IMethodSignatureMember AddNew(TypedName nameAndReturn, TypedName[] parameters, TypeConstrainedName[] typeParameters)
        {
            IMethodSignatureMember methodMember = new MethodSignatureMember(nameAndReturn, this.TargetDeclaration, parameters, typeParameters);

            if (this.ContainsKey(methodMember.GetUniqueIdentifier()))
            {
                throw new InvalidOperationException("method signature exists");
            }
            this._Add(methodMember.GetUniqueIdentifier(), methodMember);
            return(methodMember);
        }
Exemplo n.º 2
0
 private static IMemberParentExpression GetRootReference(MethodSignatureMember <TParameter, TTypeParameter, TSignatureDom, TParent> referencePoint)
 {
     if (referencePoint is MethodMember)
     {
         var mReference = referencePoint as MethodMember;
         if (mReference.IsStatic)
         {
             return(mReference.ParentTarget.GetTypeReference().GetTypeExpression());
         }
         else
         {
             return(mReference.ParentTarget.GetThisExpression());
         }
     }
     else
     {
         throw new NotSupportedException();
     }
 }
Exemplo n.º 3
0
 public ReferenceExpression(MethodSignatureMember <TParameter, TTypeParameter, TSignatureDom, TParent> referencePoint, IMemberParentExpression parentExpression)
     : base(referencePoint.Name, parentExpression)
 {
     this.referencePoint = referencePoint;
 }
Exemplo n.º 4
0
 public ReferenceExpression(MethodSignatureMember <TParameter, TTypeParameter, TSignatureDom, TParent> referencePoint)
     : base(referencePoint.Name, GetRootReference(referencePoint))
 {
     this.referencePoint = referencePoint;
 }