private void writeSignature(string type, ICodeReference coderef, string[] additional) { var json = ""; if (coderef.JSON != null) { json = coderef.JSON; } var additionalArguments = ""; if (_visibility == true) { foreach (var argument in additional) { additionalArguments += "|" + argument; } } _writer.Write("signature|{0}|{1}|{2}|{3}|{4}|{5}|{6}|{7}{8}", coderef.Parent, coderef.Signature, coderef.Name, type, coderef.Scope, coderef.Line, coderef.Column, json, additionalArguments); }
private void add(ICodeReference reference) { if (_codeReferences.Any(x => x.Is(reference))) { return; } _codeReferences.Add(reference); }
private void addSignaturePosition(ICodeReference x) { var fullSignature = x.Signature; if (!_signaturePositions.ContainsKey(fullSignature)) { _signaturePositions.Add(fullSignature, new FilePosition(x.File.File, x.Line, x.Column)); } }
public string Format(ICodeReference reference) { return string.Format("signature|{0}|{1}|{2}|{3}|{4}|{5}", reference.Signature, reference.Name, reference.Type, reference.Offset, reference.Line, reference.Column); }
private void addNameAndTypeIndex(ICodeReference x) { var signature = x.Parent + "." + x.Name; _typeIndex.Add(signature); if (!_nameIndex.ContainsKey(x.Name)) { _nameIndex.Add(x.Name, signature); } }
private void addItem(ICodeReference type) { var item = informationList.Items.Add(type.Language); item.SubItems.Add(type.Type); item.SubItems.Add(type.Name); item.SubItems.Add( string.Format("{0} ({1})", type.Signature, Path.GetFileName(type.File))); item.Tag = type; }
public string Format(ICodeReference reference) { return(string.Format("{0}|signature|{1}|{2}|{3}|{4}|{5}|{6}|{7}|{8}", reference.Language, reference.Parent, reference.Signature, reference.Name, reference.Type, reference.Scope, reference.Line, reference.Column, reference.JSON)); }
public string Format(ICodeReference reference) { return string.Format("{0}|signature|{1}|{2}|{3}|{4}|{5}|{6}|{7}|{8}", reference.Language, reference.Parent, reference.Signature, reference.Name, reference.Type, reference.Scope, reference.Line, reference.Column, reference.JSON); }
private void writeSignature(string type, ICodeReference coderef, string[] additional) { var additionalArguments = ""; foreach (var argument in additional) additionalArguments += "|" + argument; Console.WriteLine("signature|{0}|{1}|{2}|{3}|{4}|{5}{6}", coderef.Signature, coderef.Name, type, coderef.Offset, coderef.Line, coderef.Column, additionalArguments); }
public bool Is(ICodeReference compare) { return (Language == compare.Language && Type == compare.Type && File == compare.File && Signature == compare.Signature && Parent == compare.Parent && Name == compare.Name && Scope == compare.Scope && Line == compare.Line && Column == compare.Column && JSON == compare.JSON && TypeSearch == compare.TypeSearch); }
private void Validate(ICodeReference codeReference) { string usingNamespace = GetNamespace(codeReference.ReferencingDeclaration); string usedNamespace = GetNamespace(codeReference.ReferencedDeclaration); if (usingNamespace.Equals(usedNamespace, StringComparison.Ordinal)) { return; } if (this.namespaces.Any( x => usingNamespace.Equals(x, StringComparison.Ordinal) || (usingNamespace.StartsWith(x, StringComparison.Ordinal) && usingNamespace[x.Length] == '.'))) { return; } object[] arguments = new object[] { /*...*/ }; Message.Write(MessageLocation.Of(codeReference.ReferencingDeclaration), SeverityType.Warning, "ErrorCode", "Access error message.", arguments); }
private bool filter(ICodeReference reference, Query query, Func<string, string, bool> matcher) { if (query == null) return true; if (query.Language != null && !matcher(reference.Language, query.Language)) return false; if (query.Type != null && !matcher(reference.Type, query.Type)) return false; if (query.File != null && !matcher(reference.File, query.File)) return false; if (query.Signature != null && !matcher(reference.Signature, query.Signature)) return false; if (query.Name != null && !matcher(reference.Name, query.Name)) return false; if (query.Parent != null && !matcher(reference.Parent, query.Parent)) return false; if (query.Custom != null && !matcher(reference.JSON, query.Custom)) return false; return true; }
private bool filter(ICodeReference reference, Query query, Func <string, string, bool> matcher) { if (query == null) { return(true); } if (query.Language != null && !matcher(reference.Language, query.Language)) { return(false); } if (query.Type != null && !matcher(reference.Type, query.Type)) { return(false); } if (query.File != null && !matcher(reference.File, query.File)) { return(false); } if (query.Signature != null && !matcher(reference.Signature, query.Signature)) { return(false); } if (query.Name != null && !matcher(reference.Name, query.Name)) { return(false); } if (query.Parent != null && !matcher(reference.Parent, query.Parent)) { return(false); } if (query.Custom != null && !matcher(reference.JSON, query.Custom)) { return(false); } return(true); }
public void Add(ICodeReference reference) { Signatures.Add(reference); }
private void writeSignature(string type, ICodeReference coderef) { writeSignature(type, coderef, new string[] {}); }
public void Add(ICodeReference reference) { lock (_codeReferences) _codeReferences.Add(reference); }
public bool Is(ICodeReference compare) { return Language == compare.Language && Type == compare.Type && File == compare.File && Signature == compare.Signature && Parent == compare.Parent && Name == compare.Name && Scope == compare.Scope && Line == compare.Line && Column == compare.Column && JSON == compare.JSON && TypeSearch == compare.TypeSearch; }
private void add(ICodeReference reference) { if (_codeReferences.Any(x => x.Is(reference))) return; _codeReferences.Add(reference); }
public void Add(ICodeReference reference) { lock (_codeReferences) { add(reference); } }
public void Add(ICodeReference reference) { References.Add(reference); }