示例#1
0
        // Equality

        protected override bool ContentEquals(Result other)
        {
            MBDictionary d = (MBDictionary)other;

            if (store.Count != d.store.Count)
            {
                return(false);
            }

            foreach (string k in store.Keys)
            {
                if (!d.store.ContainsKey(k))
                {
                    return(false);
                }

                Result mine = (Result)store[k];

                if (!mine.Equals(d.store[k]))
                {
                    return(false);
                }
            }

            return(true);
        }
示例#2
0
		public void AddDictionary (MBDictionary substs, IBuildContext ctxt)
		{
		    foreach (string key in substs.Keys) {
			Result r = substs[key];
			
			if (r is MBString)
			    AddSubst (key, ((MBString) r).Value);
			else if (r is MBFile) {
			    MBFile f = (MBFile) r;
			    
			    if (f.Dir.Storage != ResultStorageKind.System)
				ctxt.Logger.Warning (2044, "Substituting a relative filename into a text file -- " +
						     "this will cause problems when building from a different directory. " +
						     "Be very sure that you know what you're doing.", key);
			    else
				AddSubst (key, f.GetPath (ctxt));
			} else
			    AddSubst (key, r.ToString ());
		    }
		}
示例#3
0
		// Construction

		public BinaryInfo () : base () {
			environment = new MBDictionary ();
			Architecture = ArchKind.Build;
		}
示例#4
0
        // Cloning

        protected override void CloneTo(Result dest)
        {
            MBDictionary ddest = (MBDictionary)dest;

            ddest.store = (SortedList)store.Clone();
        }