Exemple #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (LaneId.Length != 0)
            {
                hash ^= LaneId.GetHashCode();
            }
            if (Length != 0D)
            {
                hash ^= Length.GetHashCode();
            }
            hash ^= leftOut_.GetHashCode();
            hash ^= rightOut_.GetHashCode();
            if (Cost != 0D)
            {
                hash ^= Cost.GetHashCode();
            }
            if (centralCurve_ != null)
            {
                hash ^= CentralCurve.GetHashCode();
            }
            if (IsVirtual != false)
            {
                hash ^= IsVirtual.GetHashCode();
            }
            if (RoadId.Length != 0)
            {
                hash ^= RoadId.GetHashCode();
            }
            return(hash);
        }
Exemple #2
0
 public TreeNode ToTree()
 {
     return(new TreeNode("Virtuality", new[]
     {
         new TreeNode("IsVirtual", new[] { new TreeNode(IsVirtual.ToString()) }),
         new TreeNode("DefinitionType", new[] { new TreeNode(DefinitionType) }),
     }));
 }
 public TreeNode ToTree()
 {
     return(new TreeNode(Name, new[]
     {
         new TreeNode(AccessModifier),
         new TreeNode(Name),
         new TreeNode(Type),
         IsVirtual.ToTree(),
         new TreeNode("Arguments", Arguments
                      .Select(x => x.ToTree())
                      .ToArray())
     }));
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = IsVirtual.GetHashCode();
         hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Getter != null ? Getter.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Setter != null ? Setter.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FullName != null ? FullName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DeclaringType != null ? DeclaringType.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = IsVirtual.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)MethodForm;
         hashCode = (hashCode * 397) ^ (int)Visibility;
         hashCode = (hashCode * 397) ^ (Parameters != null ? Parameters.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ReturnType != null ? ReturnType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (FullName != null ? FullName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DeclaringType != null ? DeclaringType.GetHashCode() : 0);
         return(hashCode);
     }
 }
Exemple #6
0
        private Tuple <Accessibility, IsAbstract, IsStatic, IsVirtual> EmitModifiers(MethodBase method)
        {
            Accessibility access = Accessibility.Private;

            if (method.IsPublic)
            {
                access = Accessibility.Public;
            }
            else if (method.IsFamily)
            {
                access = Accessibility.Protected;
            }
            else if (method.IsFamilyAndAssembly)
            {
                access = Accessibility.ProtectedInternal;
            }

            IsAbstract isAbstract = IsAbstract.NotAbstract;

            if (method.IsAbstract)
            {
                isAbstract = IsAbstract.Abstract;
            }

            IsStatic isStatic = IsStatic.NotStatic;

            if (method.IsStatic)
            {
                isStatic = IsStatic.Static;
            }

            IsVirtual isVirtual = IsVirtual.NotVirtual;

            if (method.IsVirtual)
            {
                isVirtual = IsVirtual.Virtual;
            }

            return(new Tuple <Accessibility, IsAbstract, IsStatic, IsVirtual>(access, isAbstract, isStatic, isVirtual));
        }