コード例 #1
0
 protected override bool InnerNeedsInference(Generator generator, TypeReference inferredHint)
 {
     if ((inferredHint != null) && (!(inferredHint is NullableTypeReference)))
     {
         inferredHint = new NullableTypeReference(inferredHint);
     }
     return(parent.NeedsInference(generator, inferredHint));
 }
コード例 #2
0
ファイル: TypeReference.cs プロジェクト: bartwe/plukc
        public override bool Equals(object obj)
        {
            NullableTypeReference ntr = obj as NullableTypeReference;

            if (ntr == null)
            {
                return(false);
            }
            return(Parent.Equals(ntr.Parent));
        }
コード例 #3
0
 public override void Prepare(Generator generator, TypeReference inferredType)
 {
     base.Prepare(generator, inferredType);
     if ((inferredType != null) && (!(inferredType is NullableTypeReference)))
     {
         inferredType = new NullableTypeReference(inferredType);
     }
     parent.Prepare(generator, inferredType);
     type = parent.TypeReference;
     if (type is NullableTypeReference)
     {
         type = ((NullableTypeReference)type).Parent;
     }
 }
コード例 #4
0
 public override void Prepare(Generator generator, TypeReference inferredType)
 {
     base.Prepare(generator, inferredType);
     if (inferredType != null)
     {
         if (inferredType is NullableTypeReference)
         {
             suppressed = true;
         }
         else
         {
             inferredType = new NullableTypeReference(inferredType);
         }
     }
     parent.Prepare(generator, inferredType);
     type = parent.TypeReference;
     if (type is NullableTypeReference)
     {
         type = ((NullableTypeReference)type).Parent;
     }
 }