/// <summary> /// Adds the define instance and value to the Defines dictionary. Each define allows /// for multiple values and multiple files they are found in. This method adds any /// new information to currently stored records. /// </summary> /// <param name="identifier">The identifier/name of the define.</param> /// <param name="value">The value in the define.</param> /// <param name="foundInFileId">The file id it was found in.</param> public void AddDefineValue(string identifier, string value, int foundInFileId) { ScannedDefine define = FindDefine(identifier); if (define == null) { define = new ScannedDefine(); define.Name = identifier; _defineHash[define.Name] = define; } define.Values[value] = 1; define.UsedIn[foundInFileId] = 1; }
/// <summary> /// Adds the given ScanDefine instance to the Defines hash if it does not already exist. /// </summary> /// <param name="define">The define.</param> public void AddDefine(ScannedDefine define) { if (_defineHash.ContainsKey(define.Name) == false) { _defineHash[define.Name] = define; } }