public void SendProperty(PropertyInfoDataWrapper prop) { switch (prop.type) { case PropertyInfoDataType.Int: msServerSendPropertyInt(self, (int)prop.sourceType, prop.name, prop.path, prop.modifierName, prop.propertyName, prop.GetValue<int>()); break; case PropertyInfoDataType.Float: msServerSendPropertyFloat(self, (int)prop.sourceType, prop.name, prop.path, prop.modifierName, prop.propertyName, prop.GetValue<float>()); break; case PropertyInfoDataType.IntArray: msServerSendPropertyIntArray(self, (int)prop.sourceType, prop.name, prop.path, prop.modifierName, prop.propertyName, prop.GetValue<int[]>(), prop.arrayLength); break; case PropertyInfoDataType.FloatArray: msServerSendPropertyFloatArray(self, (int)prop.sourceType, prop.name, prop.path, prop.modifierName, prop.propertyName, prop.GetValue<float[]>(), prop.arrayLength); break; case PropertyInfoDataType.String: var s = prop.GetValue<string>(); msServerSendPropertyString(self, (int)prop.sourceType, prop.name, prop.path, prop.modifierName, prop.propertyName, s, s.Length); break; default: throw new NotImplementedException($"Type {prop.type} not implemented"); } }
public bool Matches(PropertyInfoDataWrapper other) { return (name == other.name && type == other.type && sourceType == other.sourceType && propertyName == other.propertyName && arrayLength == other.arrayLength); }