Example #1
0
 private void Initialize()
 {
     if (string.IsNullOrWhiteSpace(SourceClassName))
     {
         ResolutionType = RuntimeClassResolutionType.NotDefined;
     }
     else if (SourceClassName.Contains(","))
     {
         InitializeWithDirectClassName();
     }
     else
     {
         InitializeFromContainer();
     }
 }
Example #2
0
        /// <summary>Serves as the default hash function.</summary>
        /// <returns>A hash code for the current object.</returns>
        public override int GetHashCode()
        {
            unchecked
            {
                int hashCode = SourceClassName.GetHashCode();
                hashCode = (hashCode * 397) ^ SourceClassNamespace.GetHashCode();
                hashCode = (hashCode * 397) ^ (int)SourceMultiplicity;
                hashCode = (hashCode * 397) ^ (int)SourceRole;
                hashCode = (hashCode * 397) ^ TargetClassName.GetHashCode();
                hashCode = (hashCode * 397) ^ TargetClassNamespace.GetHashCode();
                hashCode = (hashCode * 397) ^ (int)TargetMultiplicity;
                hashCode = (hashCode * 397) ^ TargetPropertyTypeName.GetHashCode();
                hashCode = (hashCode * 397) ^ TargetPropertyName.GetHashCode();
                hashCode = (hashCode * 397) ^ (int)TargetRole;

                return(hashCode);
            }
        }