Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Fix stylecop warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGhiondea committed Sep 20, 2018
1 parent fec2be6 commit 297b19d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
7 changes: 4 additions & 3 deletions src/lib/Microsoft.Fx.Portability.Reports.DGML/DGMLManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Microsoft.Fx.Portability.Reports.DGML
/// <summary>
/// This class will manage the IDs that we generate for the DGML graph
/// </summary>
class DGMLManager
internal class DGMLManager
{
private readonly Dictionary<string, Guid> _nodesDictionary = new Dictionary<string, Guid>();

Expand Down Expand Up @@ -54,7 +54,8 @@ class DGMLManager
</DirectedGraph>";
#endregion

XDocument file;
private XDocument file;

public DGMLManager()
{
file = XDocument.Parse(_template);
Expand Down Expand Up @@ -120,7 +121,7 @@ internal void Save(Stream stream)
file.Save(ms);
ms.Position = 0;
ms.CopyTo(stream);
};
}
}

internal Guid GetOrCreateGuid(string nodeLabel)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void WriteStream(Stream stream, AnalyzeResponse response)
GenerateTargetContainers(targets);
dgml.SetTitle(response.ApplicationName);

//for each target, let's generate the assemblies
// For each target, let's generate the assemblies
foreach (var node in rg.Nodes.Keys)
{
for (int i = 0; i < targets.Count; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static ReferenceGraph CreateGraph(AnalyzeResponse response)
{
var node = rg.GetOrAddNodeForAssembly(new ReferenceNode(userAsem.AssemblyIdentity));

//for this node, make sure we capture the data, if we have it.
// For this node, make sure we capture the data, if we have it.
if (assembliesWithData.ContainsKey(node.Assembly))
{
node.UsageData = assembliesWithData[node.Assembly];
Expand Down
10 changes: 5 additions & 5 deletions src/lib/Microsoft.Fx.Portability.Reports.DGML/ReferenceNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public double GetPortabilityIndexForReferences(int target)
// sum up the number of calls to available APIs and the ones for not available APIs for references.
if (!TryGetAPICountFromReferences(target, out int availableApis, out int unavailableApis))
{
//cycle detected
// Cycle detected
return 1;
}
else
Expand All @@ -94,8 +94,8 @@ public bool TryGetAPICountFromReferences(int target, out int availAPIs, out int
// We are going to use a flag on the object to detect if we have a reference cycle while computing the APIs for the references.
if (_searchInGraph == true)
{
//cycle!!!
_searchInGraph = false; //reset this flag
// Cycle!!!
_searchInGraph = false; // Reset this flag
return false;
}
else
Expand All @@ -107,8 +107,8 @@ public bool TryGetAPICountFromReferences(int target, out int availAPIs, out int
{
if (!item.TryGetAPICountFromReferences(target, out int refCountAvail, out int refCountUnavail))
{
//cycle!
_searchInGraph = false; //reset this flag
// Cycle!
_searchInGraph = false; // Reset this flag

return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public void IncrementCallsToUnavailableApi()
}

public int GetAvailableAPICalls() => _callsToAvailableAPIs;

public int GetUnavailableAPICalls() => _callsToUnavailableAPIs;

public double PortabilityIndex
Expand Down

0 comments on commit 297b19d

Please sign in to comment.