示例#1
0
        internal Field DeepCopy(ReferenceDictionary <object, object> visited)
        {
            if (visited.TryGetValue(this, out object value))
            {
                return((Field)value);
            }

            var field = (Field)MemberwiseClone();

            visited[this] = field;

            DeepCopyMembers(field, visited);

            return(field);
        }
示例#2
0
        internal Content DeepCopy(ReferenceDictionary <object, object> visited)
        {
            if (visited.TryGetValue(this, out object value))
            {
                return((Content)value);
            }

            var content = (Content)MemberwiseClone();

            visited[this] = content;

            content.Fields = Fields?.ConvertAll(field => field.DeepCopy(visited));

            return(content);
        }
示例#3
0
    public AssemblyDefinition Resolve(AssemblyNameReference assemblyNameReference, ReaderParameters parameters)
    {
        if (parameters == null)
        {
            parameters = new ReaderParameters();
        }

        string fileFromDerivedReferences;

        if (ReferenceDictionary.TryGetValue(assemblyNameReference.Name, out fileFromDerivedReferences))
        {
            return(GetAssembly(fileFromDerivedReferences, parameters));
        }

        return(TryToReadFromDirs(assemblyNameReference, parameters));
    }