提交 146f9246 编写于 作者: J jaredpar

Part one of moving Scripting to Open

Background:

As discussed in the dev team all hands all code under the GitHub dotnet foundation is using a single process for contribution, API review, infrastructure and coding style. The idea is to present a unified view to our customer and give them a single story for contributing to any project under the dotnet foundation.

https://github.com/dotnet/corefx/wiki/Contributing#c-coding-style

The coding style transition is automated using a Roslyn based rewrite tool:

https://github.com/dotnet/codeformatter

This will be applied in stages across our developer tree. Right now the focus is on the Open directory as this is what is being presented on github. Code owners will be contacted before the transition happens.

Note: this is a soft style requirement. There are no build errors that come from this change. (changeset 1405126)
上级 478fb6af
......@@ -14,8 +14,8 @@ namespace Roslyn.Scripting
/// </summary>
internal sealed class GacFileResolver : MetadataFileReferenceResolver
{
private readonly ImmutableArray<ProcessorArchitecture> architectures;
private readonly CultureInfo preferredCulture;
private readonly ImmutableArray<ProcessorArchitecture> _architectures;
private readonly CultureInfo _preferredCulture;
/// <summary>
/// A resolver that is configured to resolve against the GAC associated
......@@ -43,8 +43,8 @@ internal sealed class GacFileResolver : MetadataFileReferenceResolver
CultureInfo preferredCulture)
: base(assemblySearchPaths, baseDirectory)
{
this.architectures = architectures;
this.preferredCulture = preferredCulture;
_architectures = architectures;
_preferredCulture = preferredCulture;
}
/// <summary>
......@@ -52,7 +52,7 @@ internal sealed class GacFileResolver : MetadataFileReferenceResolver
/// </summary>
public ImmutableArray<ProcessorArchitecture> Architectures
{
get { return architectures; }
get { return _architectures; }
}
/// <summary>
......@@ -60,7 +60,7 @@ public ImmutableArray<ProcessorArchitecture> Architectures
/// </summary>
public CultureInfo PreferredCulture
{
get { return preferredCulture; }
get { return _preferredCulture; }
}
public override string ResolveReference(string reference, string baseFilePath)
......@@ -71,7 +71,7 @@ public override string ResolveReference(string reference, string baseFilePath)
}
string path;
GlobalAssemblyCache.ResolvePartialName(reference, out path, this.architectures, this.PreferredCulture);
GlobalAssemblyCache.ResolvePartialName(reference, out path, _architectures, this.PreferredCulture);
return FileExists(path) ? path : null;
}
......@@ -83,14 +83,14 @@ public override bool Equals(object obj)
}
var other = (GacFileResolver)obj;
return this.architectures.SequenceEqual(other.architectures) &&
this.preferredCulture == other.preferredCulture;
return _architectures.SequenceEqual(other._architectures) &&
_preferredCulture == other._preferredCulture;
}
public override int GetHashCode()
{
return Hash.Combine(base.GetHashCode(),
Hash.Combine(this.preferredCulture, Hash.CombineValues(this.architectures)));
Hash.Combine(_preferredCulture, Hash.CombineValues(_architectures)));
}
}
}
......@@ -78,7 +78,7 @@ private enum ASM_CACHE
GAC_64 = 0x40, // C:\Windows\Assembly\GAC_64
ROOT_EX = 0x80, // C:\Windows\Microsoft.NET\assembly
}
[DllImport("clr", CharSet = CharSet.Auto, PreserveSig = true)]
private static extern int CreateAssemblyEnum(out IAssemblyEnum ppEnum, FusionAssemblyIdentity.IApplicationContext pAppCtx, FusionAssemblyIdentity.IAssemblyName pName, ASM_CACHE dwFlags, IntPtr pvReserved);
......@@ -289,7 +289,7 @@ public static IEnumerable<string> GetAssemblySimpleNames(ImmutableArray<Processo
out string location,
bool resolveLocation)
{
if (displayName == null)
if (displayName == null)
{
throw new ArgumentNullException("displayName");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册