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>(); this.propertyNametoOpenSCADFieldMappings = new Dictionary<string, string>();
} }
public Bindings(Dictionary<string, string> mappings) internal Bindings(Dictionary<string, string> mappings)
{ {
this.propertyNametoOpenSCADFieldMappings = mappings; this.propertyNametoOpenSCADFieldMappings = mappings;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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