diff --git a/Rules/FUI0001.md b/Rules/FUI0001.md new file mode 100644 index 0000000..b1cefbc --- /dev/null +++ b/Rules/FUI0001.md @@ -0,0 +1,19 @@ +# FUI0001 + +## Target 'xxx' not 'FUI.IElement' + +This error occurs when the target element is not inherited from FUI.IElement. + +```c# +[Binding("txt_test", nameof(UnityEngine.UI.Text.text))] +public string TestString{get; set;} => string.Empty +``` + +The UnityEngine.UI.Text is not inherited from FUI.IElement. + +The following example resolves the error: + +```c# +[Binding("txt_test", nameof(TextElement.Text))] +public string TestString{get; set;} => string.Empty +``` \ No newline at end of file diff --git a/Rules/FUI0002.md b/Rules/FUI0002.md new file mode 100644 index 0000000..5baf2e0 --- /dev/null +++ b/Rules/FUI0002.md @@ -0,0 +1,19 @@ +# FUI0002 + +## Target property 'xxx' not 'FUI.Bindable.BindableProperty<>' + +This error occurs when the target property is not inherited from FUI.Bindable.BindableProperty<T>. + +```c# +[Binding("txt_test", nameof(TextElement.name))] +public string TestString{get; set;} => string.Empty +``` + +The TextElement.name is not inherited from FUI.BindableProperty<T>. + +The following example resolves the error: + +```c# +[Binding("txt_test", nameof(TextElement.Text))] +public string TestString{get; set;} => string.Empty +``` \ No newline at end of file diff --git a/Rules/FUI0003.md b/Rules/FUI0003.md new file mode 100644 index 0000000..e118964 --- /dev/null +++ b/Rules/FUI0003.md @@ -0,0 +1,30 @@ +# FUI0003 + +## Converter 'xxx' not 'FUI.IValueConverter<,>'. + +This error occurs when the ValueConverter is not inherited from FUI.IValueConverter<,>. + +```c# +[Binding("txt_test", nameof(TextElement.Text), typeof(UnityEngine.GameObject))] +public int TestInt{get; set;} => 0 +``` + +The UnityEngine.GameObject is not inherited from FUI.IValueConverter<,>.  + +You can use other value converters or inherit custom value converters from FUI.IValueConverter<,>. + +The following example resolves the error: + +```c# +[Binding("txt_test", nameof(TextElement.Text), typeof(IntToStringConverter))] +public int TestInt{get; set;} => 0 +``` + +or + +```c# +public class CustomConverter : FUI.IValueConverter{} + +[Binding("txt_test", nameof(TextElement.Text), typeof(CustomConverter))] +public int TestInt{get; set;} => 0 +``` \ No newline at end of file diff --git a/Rules/FUI0004.md b/Rules/FUI0004.md new file mode 100644 index 0000000..e69de29 diff --git a/Rules/FUI0005.md b/Rules/FUI0005.md new file mode 100644 index 0000000..e69de29 diff --git a/Rules/FUI0006.md b/Rules/FUI0006.md new file mode 100644 index 0000000..e69de29 diff --git a/Rules/FUI0007.md b/Rules/FUI0007.md new file mode 100644 index 0000000..e69de29 diff --git a/Rules/FUI0008.md b/Rules/FUI0008.md new file mode 100644 index 0000000..e69de29 diff --git a/Rules/FUI0009.md b/Rules/FUI0009.md new file mode 100644 index 0000000..e69de29