Пример #1
0
            public GenericTypeName GetGenericTypeName()
            {
                PyList <GenericTypeName> a = Args.PyMap(q => q.GetGenericTypeName());
                var declaredin             = DeclaredIn?.GetGenericTypeName();

                return(new GenericTypeName(Name.Replace(" ", ""), a.ToArray())
                {
                    DeclaredIn = declaredin
                });
            }
Пример #2
0
        public string GetGenericName()
        {
            var txt = Args.Length > 0 ? $"{Name}`{Args.Length}" : Name;

            if (DeclaredIn == null)
            {
                return(txt);
            }
            txt = DeclaredIn?.GetGenericName() + "+" + txt;
            return(txt);
        }
Пример #3
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Id != null ? Id.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DeclaredIn != null ? DeclaredIn.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)State;
         hashCode = (hashCode * 397) ^ (Details != null ? Details.GetHashCode() : 0);
         return(hashCode);
     }
 }
Пример #4
0
 public bool Equals(RunnableInfo other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(string.Equals(Id, other.Id) && DeclaredIn.SequenceEqual(other.DeclaredIn) && string.Equals(Type, other.Type) && State == other.State && Details.SequenceEqual(other.Details));
 }