Changed accessibility on more fields for NDepend rule coverage.

This commit is contained in:
Michael L Smith 2016-03-15 19:23:50 -07:00
parent 1edce998d1
commit 7a563e92f0
7 changed files with 18 additions and 17 deletions

View File

@ -21,7 +21,7 @@ namespace OSCADSharp
this.propertyNametoOpenSCADFieldMappings = new Dictionary<string, string>();
}
public Bindings(Dictionary<string, string> mappings)
internal Bindings(Dictionary<string, string> mappings)
{
this.propertyNametoOpenSCADFieldMappings = mappings;
}

View File

@ -19,8 +19,8 @@ namespace OSCADSharp
{"height", "z" }
};
public BindableVector SizeBinding = new BindableVector(new Vector3(), sizeSynonyms);
public BindableBoolean CenterBinding = new BindableBoolean("center");
public BindableVector SizeBinding { get; set; } = new BindableVector(new Vector3(), sizeSynonyms);
public BindableBoolean CenterBinding { get; set; } = new BindableBoolean("center");
public void Bind<T>(T obj, string property, Variable variable)
{

View File

@ -11,7 +11,7 @@ namespace OSCADSharp
/// </summary>
internal abstract class SingleStatementObject : OSCADObject
{
protected OSCADObject obj;
protected OSCADObject obj { get; set; }
protected SingleStatementObject(OSCADObject obj)
{

View File

@ -78,13 +78,14 @@ namespace OSCADSharp
return piOver180 * degrees;
}
private static readonly Matrix identity = new Matrix(new double[] {
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1
}, 4, 4);
internal static Matrix Identity { get { return identity; } }
internal static Matrix Identity()
{
return new Matrix(new double[] {
1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1}, 4, 4); ;
}
/// <summary>
/// Gets a transformation matrix for performing rotations on the X-Axis
@ -95,7 +96,7 @@ namespace OSCADSharp
internal static Matrix XRotation(double angle)
{
if (angle == 0)
return Identity;
return Identity();
double radAngle = toRadians(angle);
double[] rotationArr = new double[] {
@ -117,7 +118,7 @@ namespace OSCADSharp
internal static Matrix YRotation(double angle)
{
if (angle == 0)
return Identity;
return Identity();
double radAngle = toRadians(angle);
double[] rotationArr = new double[] {
@ -139,7 +140,7 @@ namespace OSCADSharp
internal static Matrix ZRotation(double angle)
{
if (angle == 0)
return Identity;
return Identity();
double radAngle = toRadians(angle);
double[] rotationArr = new double[] {

View File

@ -777,7 +777,7 @@ namespace OSCADSharp
/// <summary>
/// Internal collection of children for this object
/// </summary>
protected List<OSCADObject> m_children = new List<OSCADObject>();
protected List<OSCADObject> m_children { get; set; } = new List<OSCADObject>();
/// <summary>
/// Returns all chidren of this OSCADObject

View File

@ -16,7 +16,7 @@ namespace OSCADSharp
/// Global variables that can be assigned for output at the
/// top of OpenSCAD scripts
/// </summary>
public static Variables Global = new Variables();
public static Variables Global { get; set; } = new Variables();
private ConcurrentDictionary<string, Variable> variables = new ConcurrentDictionary<string, Variable>();
/// <summary>

View File

@ -22,6 +22,6 @@ namespace OSCADSharp
/// Path to the OpenSCAD executable for file invocation
/// (Default value is set the default install directory on Windows)
/// </summary>
public static string OpenSCADPath = new OpenSCADPathFinder().GetPath();
public static string OpenSCADPath { get; set; } = new OpenSCADPathFinder().GetPath();
}
}