mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Updates constructor dictionary building & removes unneccesary usings
This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Crestron.SimplSharp.Reflection;
|
using Crestron.SimplSharp.Reflection;
|
||||||
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -58,16 +54,12 @@ namespace PepperDash.Essentials.AppServer
|
|||||||
public SIMPLAtcJoinMap()
|
public SIMPLAtcJoinMap()
|
||||||
{
|
{
|
||||||
// Add all the JoinDataComplete properties to the Joins Dictionary
|
// Add all the JoinDataComplete properties to the Joins Dictionary
|
||||||
GetType()
|
Joins = GetType()
|
||||||
.GetCType()
|
.GetCType()
|
||||||
.GetProperties()
|
.GetProperties()
|
||||||
.Where(x => x.PropertyType == typeof(uint))
|
.Where(prop => prop.IsDefined(typeof (JoinNameAttribute), false))
|
||||||
.ToList()
|
.Select(prop => (JoinDataComplete) prop.GetValue(this, null))
|
||||||
.ForEach(prop =>
|
.ToDictionary(join => join.GetNameAttribute(), join => join);
|
||||||
{
|
|
||||||
var join = (JoinDataComplete)prop.GetValue(this, null);
|
|
||||||
Joins.Add(join.GetNameAttribute(), join);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OffsetJoinNumbers(uint joinStart)
|
public override void OffsetJoinNumbers(uint joinStart)
|
||||||
|
|||||||
Reference in New Issue
Block a user