diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 1bc38e94..0a53a4cb 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -85,6 +85,9 @@ This repository is the **source code for the Ignite UI for Blazor component libr
- Use the latest C# version supported by the target frameworks; prefer modern features (pattern matching, file-scoped namespaces) when they compile on all TFMs
- Use strict nullability (`#nullable enable`) in new files
+- Annotate honestly: a member is `T?` only when `null` is a meaningful state; never use `!`, `null!` or `default!` to satisfy the analyzer, and keep runtime null checks at public entry points, since annotations are not enforced at runtime
+- Prefer non-nullable collections: array and collection properties, parameters and return values are non-nullable and default to an empty collection, unless the web component treats a missing collection differently from an empty one
+- Mirror the web component contract on data and option types: a field the `.d.ts` declares required is non-nullable (`required` when only user code constructs the type); a field declared optional or `| null` is `T?`; a definite-assignment attribute (`name!: string`) that the template renders with `ifDefined` is optional too, so check the render when the `.d.ts` shows a bare attribute string
- All public types live in `namespace IgniteUI.Blazor.Controls`
- Use PascalCase for public members; camelCase for private fields
- Prefix interfaces with `I` (e.g., `IIgniteUIBlazor`)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index de7eb98a..5750f18e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+### Breaking Changes
+
+#### Public API nullability
+
+> [!NOTE]
+> As part of this release the public API was annotated for nullable reference types. Beyond the members listed below, reference-type parameters, properties, and return values now declare whether they accept or produce `null`. Consumers building with nullable reference types enabled may see new nullable warnings — or errors, if warnings are treated as errors — and may need to update their code accordingly.
+
+The following public members changed from nullable to non-nullable. Value-type changes (`double?` → `double`) are binary-breaking.
+
+| Type | Member | Before | After |
+|------|--------|--------|-------|
+| `IgbTile` | `ColStart` | `double?` | `double` |
+| `IgbTile` | `RowStart` | `double?` | `double` |
+| `IgbCalendar` | `SpecialDates` | `IgbDateRangeDescriptor[]?` | `IgbDateRangeDescriptor[]` |
+| `IgbCalendar` | `DisabledDates` | `IgbDateRangeDescriptor[]?` | `IgbDateRangeDescriptor[]` |
+
## 0.1.0 - 2026-07-14
This release updates the Ignite UI for Blazor to the latest [igniteui-webcomponents@7.2.4 release](https://github.com/IgniteUI/igniteui-webcomponents/releases/tag/7.2.4) and matching related changes from `IgniteUI.Blazor` [25.2.77 (March 2026)](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-changelog-dv-blazor#25277-march-2026), [25.2.102 (May 2026)](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-changelog-dv-blazor#252102-may-2026) and [26.1.51 (June 2026)](https://www.infragistics.com/products/ignite-ui-blazor/blazor/components/general-changelog-dv-blazor#26151-june-2026) with highlights noted below:
diff --git a/Directory.Build.props b/Directory.Build.props
index e4adda19..2f8c7318 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -4,6 +4,7 @@
Infragistics
true
enable
+ $(WarningsAsErrors);nullable
enable
diff --git a/src/IgniteUI.Blazor.Lite.csproj b/src/IgniteUI.Blazor.Lite.csproj
index 16dc6390..fe0d757b 100644
--- a/src/IgniteUI.Blazor.Lite.csproj
+++ b/src/IgniteUI.Blazor.Lite.csproj
@@ -2,9 +2,6 @@
.Lite
-
- disable
diff --git a/src/components/Blazor/Accordion.cs b/src/components/Blazor/Accordion.cs
index d1fffdab..56adae88 100644
--- a/src/components/Blazor/Accordion.cs
+++ b/src/components/Blazor/Accordion.cs
@@ -80,7 +80,7 @@ public bool SingleExpand
}
///
- public override object FindByName(string name)
+ public override object? FindByName(string name)
{
var baseResult = base.FindByName(name);
if (baseResult != null)
@@ -103,7 +103,7 @@ public override object FindByName(string name)
///
public async Task HideAllAsync()
{
- await InvokeMethod("hideAll", new object[] { }, new string[] { });
+ await InvokeMethod("hideAll", new object?[] { }, new string[] { });
}
///
@@ -111,14 +111,14 @@ public async Task HideAllAsync()
///
public void HideAll()
{
- InvokeMethodSync("hideAll", new object[] { }, new string[] { });
+ InvokeMethodSync("hideAll", new object?[] { }, new string[] { });
}
///
/// Shows all of the child expansion panels' contents.
///
public async Task ShowAllAsync()
{
- await InvokeMethod("showAll", new object[] { }, new string[] { });
+ await InvokeMethod("showAll", new object?[] { }, new string[] { });
}
///
@@ -126,11 +126,11 @@ public async Task ShowAllAsync()
///
public void ShowAll()
{
- InvokeMethodSync("showAll", new object[] { }, new string[] { });
+ InvokeMethodSync("showAll", new object?[] { }, new string[] { });
}
- private string _openingRef = null;
- private string _openingScript = null;
+ private string? _openingRef = null;
+ private string? _openingScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -140,7 +140,7 @@ public void ShowAll()
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string OpeningScript
+ public string? OpeningScript
{
set
@@ -148,7 +148,7 @@ public string OpeningScript
if (value != this._openingScript)
{
this._openingScript = value;
- this.OnRefChanged("Opening", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Opening", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._openingRef = refName;
this.MarkPropDirty("OpeningRef");
@@ -201,8 +201,8 @@ public EventCallback Opening
}
}
- private string _openedRef = null;
- private string _openedScript = null;
+ private string? _openedRef = null;
+ private string? _openedScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -212,7 +212,7 @@ public EventCallback Opening
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string OpenedScript
+ public string? OpenedScript
{
set
@@ -220,7 +220,7 @@ public string OpenedScript
if (value != this._openedScript)
{
this._openedScript = value;
- this.OnRefChanged("Opened", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Opened", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._openedRef = refName;
this.MarkPropDirty("OpenedRef");
@@ -273,8 +273,8 @@ public EventCallback Opened
}
}
- private string _closingRef = null;
- private string _closingScript = null;
+ private string? _closingRef = null;
+ private string? _closingScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -284,7 +284,7 @@ public EventCallback Opened
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string ClosingScript
+ public string? ClosingScript
{
set
@@ -292,7 +292,7 @@ public string ClosingScript
if (value != this._closingScript)
{
this._closingScript = value;
- this.OnRefChanged("Closing", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Closing", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._closingRef = refName;
this.MarkPropDirty("ClosingRef");
@@ -345,8 +345,8 @@ public EventCallback Closing
}
}
- private string _closedRef = null;
- private string _closedScript = null;
+ private string? _closedRef = null;
+ private string? _closedScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -356,7 +356,7 @@ public EventCallback Closing
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string ClosedScript
+ public string? ClosedScript
{
set
@@ -364,7 +364,7 @@ public string ClosedScript
if (value != this._closedScript)
{
this._closedScript = value;
- this.OnRefChanged("Closed", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Closed", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._closedRef = refName;
this.MarkPropDirty("ClosedRef");
diff --git a/src/components/Blazor/ActiveStepChangedEventArgs.cs b/src/components/Blazor/ActiveStepChangedEventArgs.cs
index d3b973c0..cd9364c5 100644
--- a/src/components/Blazor/ActiveStepChangedEventArgs.cs
+++ b/src/components/Blazor/ActiveStepChangedEventArgs.cs
@@ -13,7 +13,7 @@ public partial class IgbActiveStepChangedEventArgs : BaseRendererElement
private static bool _marshalByValue = true;
- private IgbActiveStepChangedEventArgsDetail _detail;
+ private IgbActiveStepChangedEventArgsDetail _detail = new IgbActiveStepChangedEventArgsDetail();
///
/// The payload of the event, carrying the index of the step that became active.
@@ -25,15 +25,16 @@ public IgbActiveStepChangedEventArgsDetail Detail
set
{
MarkPropDirty("Detail");
+
if (this._detail != null)
{
this.DetachChild(this._detail);
}
+ this._detail = value;
if (value != null)
{
this.AttachChild(value);
}
- this._detail = value;
}
}
@@ -48,7 +49,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -58,13 +59,13 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("detail"))
- { this.Detail = (IgbActiveStepChangedEventArgsDetail)ConvertReturnValue(args["detail"], "ActiveStepChangedEventArgsDetail", true); }
+ if (args != null && args.TryGetValue("detail", out var detailObj) && ConvertReturnValue(detailObj, "ActiveStepChangedEventArgsDetail", true) is IgbActiveStepChangedEventArgsDetail detail)
+ { this.Detail = detail; }
this.SuppressParentNotify = false;
}
diff --git a/src/components/Blazor/ActiveStepChangedEventArgsDetail.cs b/src/components/Blazor/ActiveStepChangedEventArgsDetail.cs
index 430f79a5..88492c05 100644
--- a/src/components/Blazor/ActiveStepChangedEventArgsDetail.cs
+++ b/src/components/Blazor/ActiveStepChangedEventArgsDetail.cs
@@ -42,7 +42,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -52,12 +52,12 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("index"))
+ if (args != null && args.ContainsKey("index"))
{ this.Index = ReturnToDouble(args["index"]); }
this.SuppressParentNotify = false;
diff --git a/src/components/Blazor/ActiveStepChangingEventArgs.cs b/src/components/Blazor/ActiveStepChangingEventArgs.cs
index ad2ff8c2..66bde4f3 100644
--- a/src/components/Blazor/ActiveStepChangingEventArgs.cs
+++ b/src/components/Blazor/ActiveStepChangingEventArgs.cs
@@ -13,7 +13,7 @@ public partial class IgbActiveStepChangingEventArgs : BaseRendererElement
private static bool _marshalByValue = true;
- private IgbActiveStepChangingEventArgsDetail _detail;
+ private IgbActiveStepChangingEventArgsDetail _detail = new IgbActiveStepChangingEventArgsDetail();
///
/// The payload of the event, carrying the index of the currently active step and the index of
@@ -30,11 +30,11 @@ public IgbActiveStepChangingEventArgsDetail Detail
{
this.DetachChild(this._detail);
}
+ this._detail = value;
if (value != null)
{
this.AttachChild(value);
}
- this._detail = value;
}
}
@@ -49,7 +49,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -59,13 +59,13 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("detail"))
- { this.Detail = (IgbActiveStepChangingEventArgsDetail)ConvertReturnValue(args["detail"], "ActiveStepChangingEventArgsDetail", true); }
+ if (args != null && args.TryGetValue("detail", out var detailObj) && ConvertReturnValue(detailObj, "ActiveStepChangingEventArgsDetail", true) is IgbActiveStepChangingEventArgsDetail detail)
+ { this.Detail = detail; }
this.SuppressParentNotify = false;
}
diff --git a/src/components/Blazor/ActiveStepChangingEventArgsDetail.cs b/src/components/Blazor/ActiveStepChangingEventArgsDetail.cs
index 688cac2a..716b16d8 100644
--- a/src/components/Blazor/ActiveStepChangingEventArgsDetail.cs
+++ b/src/components/Blazor/ActiveStepChangingEventArgsDetail.cs
@@ -63,7 +63,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -75,14 +75,14 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("oldIndex"))
+ if (args != null && args.ContainsKey("oldIndex"))
{ this.OldIndex = ReturnToDouble(args["oldIndex"]); }
- if (args.ContainsKey("newIndex"))
+ if (args != null && args.ContainsKey("newIndex"))
{ this.NewIndex = ReturnToDouble(args["newIndex"]); }
this.SuppressParentNotify = false;
diff --git a/src/components/Blazor/Avatar.cs b/src/components/Blazor/Avatar.cs
index fea625c8..5754d438 100644
--- a/src/components/Blazor/Avatar.cs
+++ b/src/components/Blazor/Avatar.cs
@@ -59,13 +59,13 @@ protected override ControlEventBehavior DefaultEventBehavior
get { return ControlEventBehavior.Immediate; }
}
- private string _src;
+ private string? _src;
///
/// The image source to use.
///
[Parameter]
- public string Src
+ public string? Src
{
get { return this._src; }
set
@@ -78,13 +78,13 @@ public string Src
}
}
- private string _alt;
+ private string? _alt;
///
/// Alternative text for the image.
///
[Parameter]
- public string Alt
+ public string? Alt
{
get { return this._alt; }
set
@@ -97,13 +97,13 @@ public string Alt
}
}
- private string _initials;
+ private string? _initials;
///
/// Initials to use as a fallback when no image is available.
///
[Parameter]
- public string Initials
+ public string? Initials
{
get { return this._initials; }
set
diff --git a/src/components/Blazor/Banner.cs b/src/components/Blazor/Banner.cs
index dce6165b..39a118e1 100644
--- a/src/components/Blazor/Banner.cs
+++ b/src/components/Blazor/Banner.cs
@@ -92,7 +92,7 @@ public bool Open
/// or if it was already open.
public async Task ShowAsync()
{
- var iv = await InvokeMethod("show", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("show", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -103,7 +103,7 @@ public async Task ShowAsync()
/// or if it was already open.
public bool Show()
{
- var iv = InvokeMethodSync("show", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("show", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
///
@@ -113,7 +113,7 @@ public bool Show()
/// or if it was already closed.
public async Task HideAsync()
{
- var iv = await InvokeMethod("hide", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("hide", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -124,7 +124,7 @@ public async Task HideAsync()
/// or if it was already closed.
public bool Hide()
{
- var iv = InvokeMethodSync("hide", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("hide", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
///
@@ -134,7 +134,7 @@ public bool Hide()
/// when the transition completed successfully.
public async Task ToggleAsync()
{
- var iv = await InvokeMethod("toggle", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("toggle", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -145,12 +145,12 @@ public async Task ToggleAsync()
/// when the transition completed successfully.
public bool Toggle()
{
- var iv = InvokeMethodSync("toggle", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("toggle", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
- private string _closingRef = null;
- private string _closingScript = null;
+ private string? _closingRef = null;
+ private string? _closingScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -160,7 +160,7 @@ public bool Toggle()
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string ClosingScript
+ public string? ClosingScript
{
set
@@ -168,7 +168,7 @@ public string ClosingScript
if (value != this._closingScript)
{
this._closingScript = value;
- this.OnRefChanged("Closing", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Closing", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._closingRef = refName;
this.MarkPropDirty("ClosingRef");
@@ -221,8 +221,8 @@ public EventCallback Closing
}
}
- private string _closedRef = null;
- private string _closedScript = null;
+ private string? _closedRef = null;
+ private string? _closedScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -232,7 +232,7 @@ public EventCallback Closing
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string ClosedScript
+ public string? ClosedScript
{
set
@@ -240,7 +240,7 @@ public string ClosedScript
if (value != this._closedScript)
{
this._closedScript = value;
- this.OnRefChanged("Closed", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Closed", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._closedRef = refName;
this.MarkPropDirty("ClosedRef");
diff --git a/src/components/Blazor/BaseAlertLike.cs b/src/components/Blazor/BaseAlertLike.cs
index 639a3fcc..ff255d50 100644
--- a/src/components/Blazor/BaseAlertLike.cs
+++ b/src/components/Blazor/BaseAlertLike.cs
@@ -170,11 +170,11 @@ public NotificationPositioning Positioning
public async Task ConnectedCallbackAsync()
{
- await InvokeMethod("connectedCallback", new object[] { }, new string[] { });
+ await InvokeMethod("connectedCallback", new object?[] { }, new string[] { });
}
public void ConnectedCallback()
{
- InvokeMethodSync("connectedCallback", new object[] { }, new string[] { });
+ InvokeMethodSync("connectedCallback", new object?[] { }, new string[] { });
}
///
/// Opens the component.
@@ -186,7 +186,7 @@ public void ConnectedCallback()
///
public async Task ShowAsync()
{
- var iv = await InvokeMethod("show", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("show", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -200,7 +200,7 @@ public async Task ShowAsync()
///
public bool Show()
{
- var iv = InvokeMethodSync("show", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("show", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
///
@@ -212,7 +212,7 @@ public bool Show()
///
public async Task HideAsync()
{
- var iv = await InvokeMethod("hide", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("hide", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -225,7 +225,7 @@ public async Task HideAsync()
///
public bool Hide()
{
- var iv = InvokeMethodSync("hide", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("hide", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
///
@@ -237,7 +237,7 @@ public bool Hide()
///
public async Task ToggleAsync()
{
- var iv = await InvokeMethod("toggle", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("toggle", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -250,7 +250,7 @@ public async Task ToggleAsync()
///
public bool Toggle()
{
- var iv = InvokeMethodSync("toggle", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("toggle", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
diff --git a/src/components/Blazor/BaseComboBox.cs b/src/components/Blazor/BaseComboBox.cs
index 90097d9e..92c63d80 100644
--- a/src/components/Blazor/BaseComboBox.cs
+++ b/src/components/Blazor/BaseComboBox.cs
@@ -49,7 +49,7 @@ public bool Open
/// or if it was already open.
public async Task ShowAsync()
{
- var iv = await InvokeMethod("show", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("show", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -60,7 +60,7 @@ public async Task ShowAsync()
/// or if it was already open.
public bool Show()
{
- var iv = InvokeMethodSync("show", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("show", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
///
@@ -70,7 +70,7 @@ public bool Show()
/// or if it was already closed.
public async Task HideAsync()
{
- var iv = await InvokeMethod("hide", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("hide", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -81,7 +81,7 @@ public async Task HideAsync()
/// or if it was already closed.
public bool Hide()
{
- var iv = InvokeMethodSync("hide", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("hide", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
///
@@ -90,7 +90,7 @@ public bool Hide()
/// when the open state was changed.
public async Task ToggleAsync()
{
- var iv = await InvokeMethod("toggle", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("toggle", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -100,7 +100,7 @@ public async Task ToggleAsync()
/// when the open state was changed.
public bool Toggle()
{
- var iv = InvokeMethodSync("toggle", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("toggle", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
diff --git a/src/components/Blazor/BaseOptionLike.cs b/src/components/Blazor/BaseOptionLike.cs
index 28e2ca7b..743b54a9 100644
--- a/src/components/Blazor/BaseOptionLike.cs
+++ b/src/components/Blazor/BaseOptionLike.cs
@@ -106,14 +106,14 @@ public bool Selected
}
}
- private string _value;
+ private string? _value;
///
/// The current value of the item.
/// If not specified, the text content of the item is used.
///
[Parameter]
- public string Value
+ public string? Value
{
get { return this._value; }
set
diff --git a/src/components/Blazor/ButtonBase.cs b/src/components/Blazor/ButtonBase.cs
index 173286ab..6f7b2363 100644
--- a/src/components/Blazor/ButtonBase.cs
+++ b/src/components/Blazor/ButtonBase.cs
@@ -54,10 +54,10 @@ protected override ControlEventBehavior DefaultEventBehavior
///
/// The type of the button, which determines its behavior and semantics.
///
- /// - – no default action.
- /// - – submits the associated form when
+ ///
- — no default action.
+ /// - — submits the associated form when
/// clicked.
- /// - – resets the associated form fields to
+ ///
- — resets the associated form fields to
/// their initial values.
///
/// Ignored when the button is rendered as a link (i.e. is set).
@@ -77,7 +77,7 @@ public ButtonBaseType DisplayType
}
}
- private string _href;
+ private string? _href;
///
/// The URL the button points to. When set, the component renders as an
@@ -86,7 +86,7 @@ public ButtonBaseType DisplayType
/// for full anchor semantics.
///
[Parameter]
- public string Href
+ public string? Href
{
get { return this._href; }
set
@@ -99,7 +99,7 @@ public string Href
}
}
- private string _download;
+ private string? _download;
///
/// Prompts the browser to download the linked resource rather than navigating
@@ -107,7 +107,7 @@ public string Href
/// Only effective when is set.
///
[Parameter]
- public string Download
+ public string? Download
{
get { return this._download; }
set
@@ -125,12 +125,12 @@ public string Download
///
/// Where to open the linked document. Only effective when is set.
///
- /// - – current browsing context
+ ///
- — current browsing context
/// (default browser behavior).
- /// - – new tab or window.
- /// - – parent browsing context; falls back to
+ ///
- — new tab or window.
+ /// - — parent browsing context; falls back to
/// if none.
- /// - – top-level browsing context; falls back to
+ ///
- — top-level browsing context; falls back to
/// if none.
///
///
@@ -148,7 +148,7 @@ public ButtonBaseTarget Target
}
}
- private string _rel;
+ private string? _rel;
///
/// The relationship between the current document and the linked URL.
@@ -158,7 +158,7 @@ public ButtonBaseTarget Target
/// strongly recommended for security.
///
[Parameter]
- public string Rel
+ public string? Rel
{
get { return this._rel; }
set
@@ -190,7 +190,7 @@ public bool Disabled
}
}
- private string _command;
+ private string? _command;
///
/// The command to invoke on the target element specified by .
@@ -199,7 +199,7 @@ public bool Disabled
/// Custom commands must start with two dashes (e.g. --my-command).
///
[Parameter]
- public string Command
+ public string? Command
{
get { return this._command; }
set
@@ -241,7 +241,7 @@ public string? Commandfor
[WCWidgetMemberName("Focus")]
public async Task FocusComponentAsync(IgbFocusOptions options)
{
- await InvokeMethod("focus", new object[] { ObjectToParam(options) }, new string[] { "Json" });
+ await InvokeMethod("focus", new object?[] { ObjectToParam(options) }, new string[] { "Json" });
}
///
@@ -250,7 +250,7 @@ public async Task FocusComponentAsync(IgbFocusOptions options)
[WCWidgetMemberName("Focus")]
public void FocusComponent(IgbFocusOptions options)
{
- InvokeMethodSync("focus", new object[] { ObjectToParam(options) }, new string[] { "Json" });
+ InvokeMethodSync("focus", new object?[] { ObjectToParam(options) }, new string[] { "Json" });
}
///
/// Removes focus from the button.
@@ -259,7 +259,7 @@ public void FocusComponent(IgbFocusOptions options)
[WCWidgetMemberName("Blur")]
public async Task BlurComponentAsync()
{
- await InvokeMethod("blur", new object[] { }, new string[] { });
+ await InvokeMethod("blur", new object?[] { }, new string[] { });
}
///
@@ -268,14 +268,14 @@ public async Task BlurComponentAsync()
[WCWidgetMemberName("Blur")]
public void BlurComponent()
{
- InvokeMethodSync("blur", new object[] { }, new string[] { });
+ InvokeMethodSync("blur", new object?[] { }, new string[] { });
}
///
/// Simulates a mouse click on the button, triggering its click handler and any associated form action.
///
public async Task ClickAsync()
{
- await InvokeMethod("click", new object[] { }, new string[] { });
+ await InvokeMethod("click", new object?[] { }, new string[] { });
}
///
@@ -283,11 +283,11 @@ public async Task ClickAsync()
///
public void Click()
{
- InvokeMethodSync("click", new object[] { }, new string[] { });
+ InvokeMethodSync("click", new object?[] { }, new string[] { });
}
- private string _focusRef = null;
- private string _focusScript = null;
+ private string? _focusRef = null;
+ private string? _focusScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -297,7 +297,7 @@ public void Click()
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string FocusScript
+ public string? FocusScript
{
set
@@ -305,7 +305,7 @@ public string FocusScript
if (value != this._focusScript)
{
this._focusScript = value;
- this.OnRefChanged("Focus", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Focus", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._focusRef = refName;
this.MarkPropDirty("FocusRef");
@@ -358,8 +358,8 @@ public EventCallback Focus
}
}
- private string _blurRef = null;
- private string _blurScript = null;
+ private string? _blurRef = null;
+ private string? _blurScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -369,7 +369,7 @@ public EventCallback Focus
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string BlurScript
+ public string? BlurScript
{
set
@@ -377,7 +377,7 @@ public string BlurScript
if (value != this._blurScript)
{
this._blurScript = value;
- this.OnRefChanged("Blur", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Blur", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._blurRef = refName;
this.MarkPropDirty("BlurRef");
diff --git a/src/components/Blazor/ButtonGroup.cs b/src/components/Blazor/ButtonGroup.cs
index ee3e62ea..cc02d440 100644
--- a/src/components/Blazor/ButtonGroup.cs
+++ b/src/components/Blazor/ButtonGroup.cs
@@ -116,7 +116,7 @@ public ButtonGroupSelection Selection
}
}
- private string[] _selectedItems;
+ private string[] _selectedItems = Array.Empty();
///
/// Gets or sets the values of the currently selected buttons.
@@ -137,8 +137,8 @@ public string[] SelectedItems
}
- private string _selectRef = null;
- private string _selectScript = null;
+ private string? _selectRef = null;
+ private string? _selectScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -148,7 +148,7 @@ public string[] SelectedItems
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string SelectScript
+ public string? SelectScript
{
set
@@ -156,7 +156,7 @@ public string SelectScript
if (value != this._selectScript)
{
this._selectScript = value;
- this.OnRefChanged("Select", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Select", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._selectRef = refName;
this.MarkPropDirty("SelectRef");
@@ -209,8 +209,8 @@ public EventCallback Select
}
}
- private string _deselectRef = null;
- private string _deselectScript = null;
+ private string? _deselectRef = null;
+ private string? _deselectScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -220,7 +220,7 @@ public EventCallback Select
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string DeselectScript
+ public string? DeselectScript
{
set
@@ -228,7 +228,7 @@ public string DeselectScript
if (value != this._deselectScript)
{
this._deselectScript = value;
- this.OnRefChanged("Deselect", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Deselect", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._deselectRef = refName;
this.MarkPropDirty("DeselectRef");
diff --git a/src/components/Blazor/Calendar.cs b/src/components/Blazor/Calendar.cs
index 1f37de61..e8ecb5b2 100644
--- a/src/components/Blazor/Calendar.cs
+++ b/src/components/Blazor/Calendar.cs
@@ -62,7 +62,7 @@ public DateTime Value
///
public async Task GetCurrentValueAsync()
{
- var iv = await InvokeMethod("p:Value", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("p:Value", new object?[] { }, new string[] { });
return ReturnToDate(iv);
}
@@ -72,10 +72,10 @@ public async Task GetCurrentValueAsync()
///
public DateTime GetCurrentValue()
{
- var iv = InvokeMethodSync("p:Value", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("p:Value", new object?[] { }, new string[] { });
return ReturnToDate(iv);
}
- private DateTime[] _values;
+ private DateTime[] _values = Array.Empty();
///
/// The current values of the calendar.
@@ -104,7 +104,7 @@ public DateTime[] Values
///
public async Task GetCurrentValuesAsync()
{
- var iv = await InvokeMethod("p:Values", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("p:Values", new object?[] { }, new string[] { });
return ReturnToDateArray(iv);
}
@@ -115,7 +115,7 @@ public async Task GetCurrentValuesAsync()
///
public DateTime[] GetCurrentValues()
{
- var iv = InvokeMethodSync("p:Values", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("p:Values", new object?[] { }, new string[] { });
return ReturnToDateArray(iv);
}
private DateTime _activeDate = DateTime.MinValue;
@@ -254,7 +254,11 @@ public CalendarActiveView ActiveView
}
}
- private IgbCalendarFormatOptions _formatOptions;
+ private IgbCalendarFormatOptions _formatOptions = new IgbCalendarFormatOptions()
+ {
+ Month = "long",
+ Weekday = "narrow",
+ };
///
/// The options used to format the months and the weekdays in the calendar views.
@@ -270,11 +274,11 @@ public IgbCalendarFormatOptions FormatOptions
{
this.DetachChild(this._formatOptions);
}
+ this._formatOptions = value;
if (value != null)
{
this.AttachChild(value);
}
- this._formatOptions = value;
}
}
@@ -341,8 +345,8 @@ public EventCallback ValuesChanged
}
}
- private string _changeRef = null;
- private string _changeScript = null;
+ private string? _changeRef = null;
+ private string? _changeScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -352,7 +356,7 @@ public EventCallback ValuesChanged
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string ChangeScript
+ public string? ChangeScript
{
set
@@ -360,7 +364,7 @@ public string ChangeScript
if (value != this._changeScript)
{
this._changeScript = value;
- this.OnRefChanged("Change", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Change", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._changeRef = refName;
this.MarkPropDirty("ChangeRef");
diff --git a/src/components/Blazor/CalendarBase.cs b/src/components/Blazor/CalendarBase.cs
index b7f03942..9a106541 100644
--- a/src/components/Blazor/CalendarBase.cs
+++ b/src/components/Blazor/CalendarBase.cs
@@ -79,13 +79,13 @@ public WeekDays WeekStart
}
}
- private string _locale;
+ private string? _locale;
///
/// Gets/Sets the locale used for formatting and displaying the dates in the component.
///
[Parameter]
- public string Locale
+ public string? Locale
{
get { return this._locale; }
set
@@ -98,13 +98,13 @@ public string Locale
}
}
- private IgbCalendarResourceStrings _resourceStrings;
+ private IgbCalendarResourceStrings? _resourceStrings;
///
/// The resource strings for localization.
///
[Parameter]
- public IgbCalendarResourceStrings ResourceStrings
+ public IgbCalendarResourceStrings? ResourceStrings
{
get { return this._resourceStrings; }
set
@@ -122,13 +122,13 @@ public IgbCalendarResourceStrings ResourceStrings
}
}
- private IgbDateRangeDescriptor[]? _specialDates;
+ private IgbDateRangeDescriptor[] _specialDates = Array.Empty();
///
/// Gets/Sets the special dates for the component.
///
[Parameter]
- public IgbDateRangeDescriptor[]? SpecialDates
+ public IgbDateRangeDescriptor[] SpecialDates
{
get { return this._specialDates; }
set
@@ -141,13 +141,13 @@ public IgbDateRangeDescriptor[]? SpecialDates
}
}
- private IgbDateRangeDescriptor[]? _disabledDates;
+ private IgbDateRangeDescriptor[] _disabledDates = Array.Empty();
///
/// Gets/Sets the disabled dates for the component.
///
[Parameter]
- public IgbDateRangeDescriptor[]? DisabledDates
+ public IgbDateRangeDescriptor[] DisabledDates
{
get { return this._disabledDates; }
set
diff --git a/src/components/Blazor/CalendarFormatOptions.cs b/src/components/Blazor/CalendarFormatOptions.cs
index 8dfbfa9b..3470067e 100644
--- a/src/components/Blazor/CalendarFormatOptions.cs
+++ b/src/components/Blazor/CalendarFormatOptions.cs
@@ -13,14 +13,14 @@ public partial class IgbCalendarFormatOptions : BaseRendererElement
private static bool _marshalByValue = true;
- private string _weekday;
+ private string? _weekday;
///
/// The representation of the weekday names, one of long, short or narrow.
/// Defaults to narrow.
///
[Parameter]
- public string Weekday
+ public string? Weekday
{
get { return this._weekday; }
set
@@ -33,14 +33,14 @@ public string Weekday
}
}
- private string _month;
+ private string? _month;
///
/// The representation of the month names, one of numeric, 2-digit, long,
/// short or narrow. Defaults to long.
///
[Parameter]
- public string Month
+ public string? Month
{
get { return this._month; }
set
@@ -66,7 +66,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -78,14 +78,14 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("weekday"))
+ if (args != null && args.ContainsKey("weekday"))
{ this.Weekday = ReturnToString(args["weekday"]); }
- if (args.ContainsKey("month"))
+ if (args != null && args.ContainsKey("month"))
{ this.Month = ReturnToString(args["month"]); }
this.SuppressParentNotify = false;
diff --git a/src/components/Blazor/CalendarResourceStrings.cs b/src/components/Blazor/CalendarResourceStrings.cs
index 064c7609..8d50e454 100644
--- a/src/components/Blazor/CalendarResourceStrings.cs
+++ b/src/components/Blazor/CalendarResourceStrings.cs
@@ -1,4 +1,4 @@
-using Microsoft.AspNetCore.Components;
+using Microsoft.AspNetCore.Components;
namespace IgniteUI.Blazor.Controls
{
@@ -11,13 +11,13 @@ public partial class IgbCalendarResourceStrings : BaseRendererElement
///
public override string Type { get { return "WebCalendarResourceStrings"; } }
- private string _selectMonth;
+ private string? _selectMonth;
///
/// The accessible label of the header button that switches the calendar to the months view.
///
[Parameter]
- public string SelectMonth
+ public string? SelectMonth
{
get { return this._selectMonth; }
set
@@ -30,13 +30,13 @@ public string SelectMonth
}
}
- private string _selectYear;
+ private string? _selectYear;
///
/// The accessible label of the header button that switches the calendar to the years view.
///
[Parameter]
- public string SelectYear
+ public string? SelectYear
{
get { return this._selectYear; }
set
@@ -49,14 +49,14 @@ public string SelectYear
}
}
- private string _selectDate;
+ private string? _selectDate;
///
/// Title shown in the calendar header in single selection mode.
/// Defaults to Select Date.
///
[Parameter]
- public string SelectDate
+ public string? SelectDate
{
get { return this._selectDate; }
set
@@ -69,14 +69,14 @@ public string SelectDate
}
}
- private string _selectRange;
+ private string? _selectRange;
///
/// Title shown in the calendar header in range selection mode.
/// Defaults to Select Range.
///
[Parameter]
- public string SelectRange
+ public string? SelectRange
{
get { return this._selectRange; }
set
@@ -89,14 +89,14 @@ public string SelectRange
}
}
- private string _selectedDate;
+ private string? _selectedDate;
///
/// The label for the currently selected date.
///
[Parameter]
[Obsolete("This property is not used in the current localization pipeline and has no effect. It will be removed in a future release.")]
- public string SelectedDate
+ public string? SelectedDate
{
get { return this._selectedDate; }
set
@@ -109,14 +109,14 @@ public string SelectedDate
}
}
- private string _startDate;
+ private string? _startDate;
///
/// Placeholder shown in the calendar header in place of the range start date until one is selected.
/// Defaults to Start.
///
[Parameter]
- public string StartDate
+ public string? StartDate
{
get { return this._startDate; }
set
@@ -129,14 +129,14 @@ public string StartDate
}
}
- private string _endDate;
+ private string? _endDate;
///
/// Placeholder shown in the calendar header in place of the range end date until one is selected.
/// Defaults to End.
///
[Parameter]
- public string EndDate
+ public string? EndDate
{
get { return this._endDate; }
set
@@ -149,14 +149,14 @@ public string EndDate
}
}
- private string _previousMonth;
+ private string? _previousMonth;
///
/// The accessible label of the navigation button that moves the days view one month back.
/// Defaults to Previous Month.
///
[Parameter]
- public string PreviousMonth
+ public string? PreviousMonth
{
get { return this._previousMonth; }
set
@@ -169,14 +169,14 @@ public string PreviousMonth
}
}
- private string _nextMonth;
+ private string? _nextMonth;
///
/// The accessible label of the navigation button that moves the days view one month forward.
/// Defaults to Next Month.
///
[Parameter]
- public string NextMonth
+ public string? NextMonth
{
get { return this._nextMonth; }
set
@@ -189,14 +189,14 @@ public string NextMonth
}
}
- private string _previousYear;
+ private string? _previousYear;
///
/// The accessible label of the navigation button that moves the months view one year back.
/// Defaults to Previous Year.
///
[Parameter]
- public string PreviousYear
+ public string? PreviousYear
{
get { return this._previousYear; }
set
@@ -209,14 +209,14 @@ public string PreviousYear
}
}
- private string _nextYear;
+ private string? _nextYear;
///
/// The accessible label of the navigation button that moves the months view one year forward.
/// Defaults to Next Year.
///
[Parameter]
- public string NextYear
+ public string? NextYear
{
get { return this._nextYear; }
set
@@ -229,14 +229,14 @@ public string NextYear
}
}
- private string _previousYears;
+ private string? _previousYears;
///
/// The accessible label of the navigation button that moves the years view one page back.
/// Defaults to Previous {0} Years, where {0} is the number of years on a page.
///
[Parameter]
- public string PreviousYears
+ public string? PreviousYears
{
get { return this._previousYears; }
set
@@ -249,14 +249,14 @@ public string PreviousYears
}
}
- private string _nextYears;
+ private string? _nextYears;
///
/// The accessible label of the navigation button that moves the years view one page forward.
/// Defaults to Next {0} Years, where {0} is the number of years on a page.
///
[Parameter]
- public string NextYears
+ public string? NextYears
{
get { return this._nextYears; }
set
@@ -269,13 +269,13 @@ public string NextYears
}
}
- private string _weekLabel;
+ private string? _weekLabel;
///
/// The header of the week numbers column in the days view. Defaults to Wk.
///
[Parameter]
- public string WeekLabel
+ public string? WeekLabel
{
get { return this._weekLabel; }
set
diff --git a/src/components/Blazor/Carousel.cs b/src/components/Blazor/Carousel.cs
index e8d79980..2ab378f5 100644
--- a/src/components/Blazor/Carousel.cs
+++ b/src/components/Blazor/Carousel.cs
@@ -173,14 +173,14 @@ public CarouselIndicatorsOrientation IndicatorsOrientation
}
}
- private string _indicatorsLabelFormat;
+ private string? _indicatorsLabelFormat;
///
/// The format used to set the aria-label on the carousel indicators.
/// Instances of {0} will be replaced with the index of the corresponding slide.
///
[Parameter]
- public string IndicatorsLabelFormat
+ public string? IndicatorsLabelFormat
{
get { return this._indicatorsLabelFormat; }
set
@@ -193,7 +193,7 @@ public string IndicatorsLabelFormat
}
}
- private string _slidesLabelFormat;
+ private string? _slidesLabelFormat;
///
/// The format used to set the aria-label on the carousel slides and the text displayed
@@ -202,7 +202,7 @@ public string IndicatorsLabelFormat
/// Instances of {1} will be replaced with the total amount of slides.
///
[Parameter]
- public string SlidesLabelFormat
+ public string? SlidesLabelFormat
{
get { return this._slidesLabelFormat; }
set
@@ -278,7 +278,7 @@ public HorizontalTransitionAnimation AnimationType
///
public async Task GetTotalAsync()
{
- var iv = await InvokeMethod("p:Total", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("p:Total", new object?[] { }, new string[] { });
return ReturnToDouble(iv);
}
@@ -287,7 +287,7 @@ public async Task GetTotalAsync()
///
public double GetTotal()
{
- var iv = InvokeMethodSync("p:Total", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("p:Total", new object?[] { }, new string[] { });
return ReturnToDouble(iv);
}
@@ -296,7 +296,7 @@ public double GetTotal()
///
public async Task GetCurrentAsync()
{
- var iv = await InvokeMethod("p:Current", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("p:Current", new object?[] { }, new string[] { });
return ReturnToDouble(iv);
}
@@ -305,7 +305,7 @@ public async Task GetCurrentAsync()
///
public double GetCurrent()
{
- var iv = InvokeMethodSync("p:Current", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("p:Current", new object?[] { }, new string[] { });
return ReturnToDouble(iv);
}
@@ -314,7 +314,7 @@ public double GetCurrent()
///
public async Task GetIsPlayingAsync()
{
- var iv = await InvokeMethod("p:IsPlaying", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("p:IsPlaying", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -323,7 +323,7 @@ public async Task GetIsPlayingAsync()
///
public bool GetIsPlaying()
{
- var iv = InvokeMethodSync("p:IsPlaying", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("p:IsPlaying", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -332,7 +332,7 @@ public bool GetIsPlaying()
///
public async Task GetIsPausedAsync()
{
- var iv = await InvokeMethod("p:IsPaused", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("p:IsPaused", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -341,7 +341,7 @@ public async Task GetIsPausedAsync()
///
public bool GetIsPaused()
{
- var iv = InvokeMethodSync("p:IsPaused", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("p:IsPaused", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -350,7 +350,7 @@ public bool GetIsPaused()
///
public async Task PlayAsync()
{
- await InvokeMethod("play", new object[] { }, new string[] { });
+ await InvokeMethod("play", new object?[] { }, new string[] { });
}
///
@@ -358,14 +358,14 @@ public async Task PlayAsync()
///
public void Play()
{
- InvokeMethodSync("play", new object[] { }, new string[] { });
+ InvokeMethodSync("play", new object?[] { }, new string[] { });
}
///
/// Pauses the rotation of the carousel slides.
///
public async Task PauseAsync()
{
- await InvokeMethod("pause", new object[] { }, new string[] { });
+ await InvokeMethod("pause", new object?[] { }, new string[] { });
}
///
@@ -373,7 +373,7 @@ public async Task PauseAsync()
///
public void Pause()
{
- InvokeMethodSync("pause", new object[] { }, new string[] { });
+ InvokeMethodSync("pause", new object?[] { }, new string[] { });
}
///
/// Switches to the next slide, running any animations.
@@ -383,7 +383,7 @@ public void Pause()
///
public async Task NextAsync()
{
- var iv = await InvokeMethod("next", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("next", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -395,7 +395,7 @@ public async Task NextAsync()
///
public bool Next()
{
- var iv = InvokeMethodSync("next", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("next", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
///
@@ -406,7 +406,7 @@ public bool Next()
///
public async Task PrevAsync()
{
- var iv = await InvokeMethod("prev", new object[] { }, new string[] { });
+ var iv = await InvokeMethod("prev", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -418,7 +418,7 @@ public async Task PrevAsync()
///
public bool Prev()
{
- var iv = InvokeMethodSync("prev", new object[] { }, new string[] { });
+ var iv = InvokeMethodSync("prev", new object?[] { }, new string[] { });
return ReturnToBoolean(iv);
}
@@ -430,7 +430,7 @@ public bool Prev()
///
public async Task SelectAsync(double index, CarouselAnimationDirection? animationDirection = null)
{
- var iv = await InvokeMethod("select", new object[] { index, ObjectToParam(animationDirection, typeof(CarouselAnimationDirection)) }, new string[] { "Number", "Json" });
+ var iv = await InvokeMethod("select", new object?[] { index, ObjectToParam(animationDirection, typeof(CarouselAnimationDirection)) }, new string[] { "Number", "Json" });
return ReturnToBoolean(iv);
}
@@ -442,12 +442,12 @@ public async Task SelectAsync(double index, CarouselAnimationDirection? an
///
public bool Select(double index, CarouselAnimationDirection? animationDirection = null)
{
- var iv = InvokeMethodSync("select", new object[] { index, ObjectToParam(animationDirection, typeof(CarouselAnimationDirection)) }, new string[] { "Number", "Json" });
+ var iv = InvokeMethodSync("select", new object?[] { index, ObjectToParam(animationDirection, typeof(CarouselAnimationDirection)) }, new string[] { "Number", "Json" });
return ReturnToBoolean(iv);
}
- private string _slideChangedRef = null;
- private string _slideChangedScript = null;
+ private string? _slideChangedRef = null;
+ private string? _slideChangedScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -457,7 +457,7 @@ public bool Select(double index, CarouselAnimationDirection? animationDirection
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string SlideChangedScript
+ public string? SlideChangedScript
{
set
@@ -465,7 +465,7 @@ public string SlideChangedScript
if (value != this._slideChangedScript)
{
this._slideChangedScript = value;
- this.OnRefChanged("SlideChanged", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("SlideChanged", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._slideChangedRef = refName;
this.MarkPropDirty("SlideChangedRef");
@@ -518,8 +518,8 @@ public EventCallback SlideChanged
}
}
- private string _playingRef = null;
- private string _playingScript = null;
+ private string? _playingRef = null;
+ private string? _playingScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -529,7 +529,7 @@ public EventCallback SlideChanged
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string PlayingScript
+ public string? PlayingScript
{
set
@@ -537,7 +537,7 @@ public string PlayingScript
if (value != this._playingScript)
{
this._playingScript = value;
- this.OnRefChanged("Playing", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Playing", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._playingRef = refName;
this.MarkPropDirty("PlayingRef");
@@ -590,8 +590,8 @@ public EventCallback Playing
}
}
- private string _pausedRef = null;
- private string _pausedScript = null;
+ private string? _pausedRef = null;
+ private string? _pausedScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -601,7 +601,7 @@ public EventCallback Playing
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string PausedScript
+ public string? PausedScript
{
set
@@ -609,7 +609,7 @@ public string PausedScript
if (value != this._pausedScript)
{
this._pausedScript = value;
- this.OnRefChanged("Paused", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("Paused", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._pausedRef = refName;
this.MarkPropDirty("PausedRef");
diff --git a/src/components/Blazor/Chat.cs b/src/components/Blazor/Chat.cs
index 4a0553b7..6db6d49e 100644
--- a/src/components/Blazor/Chat.cs
+++ b/src/components/Blazor/Chat.cs
@@ -49,7 +49,7 @@ public IgbChat() : base()
this.Options = new IgbChatOptions();
}
- private IgbChatMessage[] _messages;
+ private IgbChatMessage[] _messages = Array.Empty();
///
/// The list of chat messages currently displayed.
@@ -69,7 +69,7 @@ public IgbChatMessage[] Messages
}
}
- private IgbChatDraftMessage _draftMessage;
+ private IgbChatDraftMessage _draftMessage = new IgbChatDraftMessage();
///
/// The chat message currently being composed but not yet sent.
@@ -86,11 +86,11 @@ public IgbChatDraftMessage DraftMessage
{
this.DetachChild(this._draftMessage);
}
+ this._draftMessage = value;
if (value != null)
{
this.AttachChild(value);
}
- this._draftMessage = value;
}
}
@@ -128,7 +128,7 @@ public IgbChatOptions? Options
///
public async Task ScrollToMessageAsync(String messageId)
{
- await InvokeMethod("scrollToMessage", new object[] { StringToString(messageId) }, new string[] { "String" });
+ await InvokeMethod("scrollToMessage", new object?[] { StringToString(messageId) }, new string[] { "String" });
}
///
@@ -136,11 +136,11 @@ public async Task ScrollToMessageAsync(String messageId)
///
public void ScrollToMessage(String messageId)
{
- InvokeMethodSync("scrollToMessage", new object[] { StringToString(messageId) }, new string[] { "String" });
+ InvokeMethodSync("scrollToMessage", new object?[] { StringToString(messageId) }, new string[] { "String" });
}
- private string _messageCreatedRef = null;
- private string _messageCreatedScript = null;
+ private string? _messageCreatedRef = null;
+ private string? _messageCreatedScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -150,7 +150,7 @@ public void ScrollToMessage(String messageId)
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string MessageCreatedScript
+ public string? MessageCreatedScript
{
set
@@ -158,7 +158,7 @@ public string MessageCreatedScript
if (value != this._messageCreatedScript)
{
this._messageCreatedScript = value;
- this.OnRefChanged("MessageCreated", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("MessageCreated", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._messageCreatedRef = refName;
this.MarkPropDirty("MessageCreatedRef");
@@ -211,8 +211,8 @@ public EventCallback MessageCreated
}
}
- private string _messageReactRef = null;
- private string _messageReactScript = null;
+ private string? _messageReactRef = null;
+ private string? _messageReactScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -222,7 +222,7 @@ public EventCallback MessageCreated
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string MessageReactScript
+ public string? MessageReactScript
{
set
@@ -230,7 +230,7 @@ public string MessageReactScript
if (value != this._messageReactScript)
{
this._messageReactScript = value;
- this.OnRefChanged("MessageReact", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("MessageReact", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._messageReactRef = refName;
this.MarkPropDirty("MessageReactRef");
@@ -283,8 +283,8 @@ public EventCallback MessageReact
}
}
- private string _attachmentClickRef = null;
- private string _attachmentClickScript = null;
+ private string? _attachmentClickRef = null;
+ private string? _attachmentClickScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -294,7 +294,7 @@ public EventCallback MessageReact
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string AttachmentClickScript
+ public string? AttachmentClickScript
{
set
@@ -302,7 +302,7 @@ public string AttachmentClickScript
if (value != this._attachmentClickScript)
{
this._attachmentClickScript = value;
- this.OnRefChanged("AttachmentClick", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("AttachmentClick", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._attachmentClickRef = refName;
this.MarkPropDirty("AttachmentClickRef");
@@ -355,8 +355,8 @@ public EventCallback AttachmentClick
}
}
- private string _typingChangeRef = null;
- private string _typingChangeScript = null;
+ private string? _typingChangeRef = null;
+ private string? _typingChangeScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -366,7 +366,7 @@ public EventCallback AttachmentClick
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string TypingChangeScript
+ public string? TypingChangeScript
{
set
@@ -374,7 +374,7 @@ public string TypingChangeScript
if (value != this._typingChangeScript)
{
this._typingChangeScript = value;
- this.OnRefChanged("TypingChange", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("TypingChange", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._typingChangeRef = refName;
this.MarkPropDirty("TypingChangeRef");
@@ -427,8 +427,8 @@ public EventCallback TypingChange
}
}
- private string _inputFocusRef = null;
- private string _inputFocusScript = null;
+ private string? _inputFocusRef = null;
+ private string? _inputFocusScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -438,7 +438,7 @@ public EventCallback TypingChange
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string InputFocusScript
+ public string? InputFocusScript
{
set
@@ -446,7 +446,7 @@ public string InputFocusScript
if (value != this._inputFocusScript)
{
this._inputFocusScript = value;
- this.OnRefChanged("InputFocus", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("InputFocus", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._inputFocusRef = refName;
this.MarkPropDirty("InputFocusRef");
@@ -499,8 +499,8 @@ public EventCallback InputFocus
}
}
- private string _inputBlurRef = null;
- private string _inputBlurScript = null;
+ private string? _inputBlurRef = null;
+ private string? _inputBlurScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -510,7 +510,7 @@ public EventCallback InputFocus
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string InputBlurScript
+ public string? InputBlurScript
{
set
@@ -518,7 +518,7 @@ public string InputBlurScript
if (value != this._inputBlurScript)
{
this._inputBlurScript = value;
- this.OnRefChanged("InputBlur", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("InputBlur", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._inputBlurRef = refName;
this.MarkPropDirty("InputBlurRef");
@@ -571,8 +571,8 @@ public EventCallback InputBlur
}
}
- private string _inputChangeRef = null;
- private string _inputChangeScript = null;
+ private string? _inputChangeRef = null;
+ private string? _inputChangeScript = null;
///
/// Name of a client-side function that handles the event in the browser instead.
@@ -582,7 +582,7 @@ public EventCallback InputBlur
/// igRegisterScript("MyHandler", function (args) { }, false).
///
[Parameter]
- public string InputChangeScript
+ public string? InputChangeScript
{
set
@@ -590,7 +590,7 @@ public string InputChangeScript
if (value != this._inputChangeScript)
{
this._inputChangeScript = value;
- this.OnRefChanged("InputChange", null, value, true, false, (string refName, object oldValue, object newValue) =>
+ this.OnRefChanged("InputChange", null, value, true, false, (string refName, object? oldValue, object? newValue) =>
{
this._inputChangeRef = refName;
this.MarkPropDirty("InputChangeRef");
diff --git a/src/components/Blazor/ChatAttachmentRenderContext.cs b/src/components/Blazor/ChatAttachmentRenderContext.cs
index 3c6c583a..871da4fb 100644
--- a/src/components/Blazor/ChatAttachmentRenderContext.cs
+++ b/src/components/Blazor/ChatAttachmentRenderContext.cs
@@ -10,7 +10,7 @@ public partial class IgbChatAttachmentRenderContext : BaseRendererElement
///
public override string Type { get { return "WebChatAttachmentRenderContext"; } }
- private IgbChatMessageAttachment _attachment;
+ private IgbChatMessageAttachment _attachment = new IgbChatMessageAttachment();
///
/// The specific attachment being rendered.
@@ -26,11 +26,11 @@ public IgbChatMessageAttachment Attachment
{
this.DetachChild(this._attachment);
}
+ this._attachment = value;
if (value != null)
{
this.AttachChild(value);
}
- this._attachment = value;
}
}
diff --git a/src/components/Blazor/ChatDraftMessage.cs b/src/components/Blazor/ChatDraftMessage.cs
index 03d07c5b..851bdfad 100644
--- a/src/components/Blazor/ChatDraftMessage.cs
+++ b/src/components/Blazor/ChatDraftMessage.cs
@@ -9,7 +9,7 @@ public partial class IgbChatDraftMessage : BaseRendererElement
private static bool _marshalByValue = true;
- private string _text;
+ private string _text = string.Empty;
///
/// The textual content of the draft message.
@@ -28,7 +28,7 @@ public string Text
}
}
- private IgbChatMessageAttachment[] _attachments;
+ private IgbChatMessageAttachment[] _attachments = Array.Empty();
///
/// An array of attachments associated with the draft message.
@@ -61,7 +61,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -73,15 +73,15 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("text"))
+ if (args != null && args.ContainsKey("text"))
{ this.Text = ReturnToString(args["text"]); }
- if (args.ContainsKey("attachments"))
- { this.Attachments = ReturnToObjectArray(args["attachments"]); }
+ if (args != null && args.ContainsKey("attachments"))
+ { this.Attachments = ReturnToObjectArray(args["attachments"]) ?? Array.Empty(); }
this.SuppressParentNotify = false;
}
diff --git a/src/components/Blazor/ChatInputRenderContext.cs b/src/components/Blazor/ChatInputRenderContext.cs
index 426a9c00..4942fd0d 100644
--- a/src/components/Blazor/ChatInputRenderContext.cs
+++ b/src/components/Blazor/ChatInputRenderContext.cs
@@ -10,7 +10,7 @@ public partial class IgbChatInputRenderContext : BaseRendererElement
///
public override string Type { get { return "WebChatInputRenderContext"; } }
- private string _value;
+ private string _value = string.Empty;
///
/// The current value of the input field.
diff --git a/src/components/Blazor/ChatMessage.cs b/src/components/Blazor/ChatMessage.cs
index 2659586e..36a24a76 100644
--- a/src/components/Blazor/ChatMessage.cs
+++ b/src/components/Blazor/ChatMessage.cs
@@ -12,7 +12,7 @@ public partial class IgbChatMessage : BaseRendererElement
private static bool _marshalByValue = true;
- private string _id;
+ private string _id = string.Empty;
///
/// A unique identifier for the message.
@@ -31,7 +31,7 @@ public string Id
}
}
- private string _text;
+ private string _text = string.Empty;
///
/// The textual content of the message.
@@ -50,7 +50,7 @@ public string Text
}
}
- private string _sender;
+ private string _sender = string.Empty;
///
/// The identifier or name of the sender of the message.
@@ -69,13 +69,13 @@ public string Sender
}
}
- private string _timestamp;
+ private string? _timestamp;
///
/// The timestamp indicating when the message was sent.
///
[Parameter]
- public string Timestamp
+ public string? Timestamp
{
get { return this._timestamp; }
set
@@ -88,7 +88,7 @@ public string Timestamp
}
}
- private IgbChatMessageAttachment[] _attachments;
+ private IgbChatMessageAttachment[] _attachments = Array.Empty();
///
/// Optional list of attachments associated with the message,
@@ -108,7 +108,7 @@ public IgbChatMessageAttachment[] Attachments
}
}
- private string[] _reactions;
+ private string[] _reactions = Array.Empty();
///
/// Optional list of reactions associated with the message.
@@ -149,7 +149,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -169,23 +169,23 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("id"))
+ if (args != null && args.ContainsKey("id"))
{ this.Id = ReturnToString(args["id"]); }
- if (args.ContainsKey("text"))
+ if (args != null && args.ContainsKey("text"))
{ this.Text = ReturnToString(args["text"]); }
- if (args.ContainsKey("sender"))
+ if (args != null && args.ContainsKey("sender"))
{ this.Sender = ReturnToString(args["sender"]); }
- if (args.ContainsKey("timestamp"))
+ if (args != null && args.ContainsKey("timestamp"))
{ this.Timestamp = ReturnToString(args["timestamp"]); }
- if (args.ContainsKey("attachments"))
- { this.Attachments = ReturnToObjectArray(args["attachments"]); }
- if (args.ContainsKey("reactions"))
- { this.Reactions = ReturnToStringArray(args["reactions"]); }
+ if (args != null && args.ContainsKey("attachments"))
+ { this.Attachments = ReturnToObjectArray(args["attachments"]) ?? Array.Empty(); }
+ if (args != null && args.ContainsKey("reactions"))
+ { this.Reactions = ReturnToStringArray(args["reactions"]) ?? Array.Empty(); }
this.SuppressParentNotify = false;
}
diff --git a/src/components/Blazor/ChatMessageAttachment.cs b/src/components/Blazor/ChatMessageAttachment.cs
index d4f80004..85f1883c 100644
--- a/src/components/Blazor/ChatMessageAttachment.cs
+++ b/src/components/Blazor/ChatMessageAttachment.cs
@@ -12,7 +12,7 @@ public partial class IgbChatMessageAttachment : BaseRendererElement
private static bool _marshalByValue = true;
- private string _id;
+ private string _id = string.Empty;
///
/// A unique identifier for the attachment.
@@ -31,14 +31,14 @@ public string Id
}
}
- private string _url;
+ private string? _url;
///
/// The URL from which the attachment can be downloaded or viewed.
/// Typically used for attachments stored on a server or CDN.
///
[Parameter]
- public string Url
+ public string? Url
{
get { return this._url; }
set
@@ -51,14 +51,14 @@ public string Url
}
}
- private string _attachmentType;
+ private string? _attachmentType;
///
/// The MIME type or a custom type identifier for the attachment (e.g. "image/png", "pdf", "audio").
///
[Parameter]
[WCWidgetMemberName("Type")]
- public string AttachmentType
+ public string? AttachmentType
{
get { return this._attachmentType; }
set
@@ -71,13 +71,13 @@ public string AttachmentType
}
}
- private string _thumbnail;
+ private string? _thumbnail;
///
/// Optional URL to a thumbnail preview of the attachment (e.g. for images or videos).
///
[Parameter]
- public string Thumbnail
+ public string? Thumbnail
{
get { return this._thumbnail; }
set
@@ -108,7 +108,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -126,20 +126,20 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("id"))
+ if (args != null && args.ContainsKey("id"))
{ this.Id = ReturnToString(args["id"]); }
- if (args.ContainsKey("name"))
+ if (args != null && args.ContainsKey("name"))
{ this.Name = ReturnToString(args["name"]); }
- if (args.ContainsKey("url"))
+ if (args != null && args.ContainsKey("url"))
{ this.Url = ReturnToString(args["url"]); }
- if (args.ContainsKey("attachmentType"))
+ if (args != null && args.ContainsKey("attachmentType"))
{ this.AttachmentType = ReturnToString(args["attachmentType"]); }
- if (args.ContainsKey("thumbnail"))
+ if (args != null && args.ContainsKey("thumbnail"))
{ this.Thumbnail = ReturnToString(args["thumbnail"]); }
this.SuppressParentNotify = false;
diff --git a/src/components/Blazor/ChatMessageAttachmentEventArgs.cs b/src/components/Blazor/ChatMessageAttachmentEventArgs.cs
index 6133eca6..91b06dad 100644
--- a/src/components/Blazor/ChatMessageAttachmentEventArgs.cs
+++ b/src/components/Blazor/ChatMessageAttachmentEventArgs.cs
@@ -13,7 +13,7 @@ public partial class IgbChatMessageAttachmentEventArgs : BaseRendererElement
private static bool _marshalByValue = true;
- private IgbChatMessageAttachment _detail;
+ private IgbChatMessageAttachment _detail = new IgbChatMessageAttachment();
///
/// The chat message attachment the event was raised for.
@@ -29,11 +29,11 @@ public IgbChatMessageAttachment Detail
{
this.DetachChild(this._detail);
}
+ this._detail = value;
if (value != null)
{
this.AttachChild(value);
}
- this._detail = value;
}
}
@@ -48,7 +48,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -58,13 +58,13 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("detail"))
- { this.Detail = (IgbChatMessageAttachment)ConvertReturnValue(args["detail"], "ChatMessageAttachment", true); }
+ if (args != null && args.TryGetValue("detail", out var detailObj) && ConvertReturnValue(detailObj, "ChatMessageAttachment", true) is IgbChatMessageAttachment detail)
+ { this.Detail = detail; }
this.SuppressParentNotify = false;
}
diff --git a/src/components/Blazor/ChatMessageEventArgs.cs b/src/components/Blazor/ChatMessageEventArgs.cs
index 2be669f0..e19da866 100644
--- a/src/components/Blazor/ChatMessageEventArgs.cs
+++ b/src/components/Blazor/ChatMessageEventArgs.cs
@@ -13,7 +13,7 @@ public partial class IgbChatMessageEventArgs : BaseRendererElement
private static bool _marshalByValue = true;
- private IgbChatMessage _detail;
+ private IgbChatMessage _detail = new IgbChatMessage();
///
/// The chat message the event was raised for.
@@ -29,11 +29,11 @@ public IgbChatMessage Detail
{
this.DetachChild(this._detail);
}
+ this._detail = value;
if (value != null)
{
this.AttachChild(value);
}
- this._detail = value;
}
}
@@ -48,7 +48,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -58,13 +58,13 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("detail"))
- { this.Detail = (IgbChatMessage)ConvertReturnValue(args["detail"], "ChatMessage", true); }
+ if (args != null && args.TryGetValue("detail", out var detailObj) && ConvertReturnValue(detailObj, "ChatMessage", true) is IgbChatMessage detail)
+ { this.Detail = detail; }
this.SuppressParentNotify = false;
}
diff --git a/src/components/Blazor/ChatMessageReaction.cs b/src/components/Blazor/ChatMessageReaction.cs
index 98e53cae..5b8ae37b 100644
--- a/src/components/Blazor/ChatMessageReaction.cs
+++ b/src/components/Blazor/ChatMessageReaction.cs
@@ -12,7 +12,7 @@ public partial class IgbChatMessageReaction : BaseRendererElement
private static bool _marshalByValue = true;
- private IgbChatMessage _message;
+ private IgbChatMessage _message = new IgbChatMessage();
///
/// The chat message that the reaction is associated with.
@@ -28,15 +28,15 @@ public IgbChatMessage Message
{
this.DetachChild(this._message);
}
+ this._message = value;
if (value != null)
{
this.AttachChild(value);
}
- this._message = value;
}
}
- private string _reaction;
+ private string _reaction = string.Empty;
///
/// The string representation of the reaction, such as an emoji or a string;
@@ -69,7 +69,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -81,14 +81,14 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("message"))
- { this.Message = (IgbChatMessage)ConvertReturnValue(args["message"], "ChatMessage", true); }
- if (args.ContainsKey("reaction"))
+ if (args != null && args.TryGetValue("message", out var messageObj) && ConvertReturnValue(messageObj, "ChatMessage", true) is IgbChatMessage message)
+ { this.Message = message; }
+ if (args != null && args.ContainsKey("reaction"))
{ this.Reaction = ReturnToString(args["reaction"]); }
this.SuppressParentNotify = false;
diff --git a/src/components/Blazor/ChatMessageReactionEventArgs.cs b/src/components/Blazor/ChatMessageReactionEventArgs.cs
index cb9345a3..aef0703b 100644
--- a/src/components/Blazor/ChatMessageReactionEventArgs.cs
+++ b/src/components/Blazor/ChatMessageReactionEventArgs.cs
@@ -13,7 +13,7 @@ public partial class IgbChatMessageReactionEventArgs : BaseRendererElement
private static bool _marshalByValue = true;
- private IgbChatMessageReaction _detail;
+ private IgbChatMessageReaction _detail = new IgbChatMessageReaction();
///
/// The reaction the event was raised for, together with the chat message it is associated with.
@@ -29,11 +29,11 @@ public IgbChatMessageReaction Detail
{
this.DetachChild(this._detail);
}
+ this._detail = value;
if (value != null)
{
this.AttachChild(value);
}
- this._detail = value;
}
}
@@ -48,7 +48,7 @@ internal override void SerializeCore(RendererSerializer ser)
}
///
- protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void ToEventJson(BaseRendererControl control, Dictionary args)
{
base.ToEventJson(control, args);
@@ -58,13 +58,13 @@ protected internal override void ToEventJson(BaseRendererControl control, Dictio
}
///
- protected internal override void FromEventJson(BaseRendererControl control, Dictionary args)
+ protected internal override void FromEventJson(BaseRendererControl control, Dictionary? args)
{
base.FromEventJson(control, args);
this.SuppressParentNotify = true;
- if (args.ContainsKey("detail"))
- { this.Detail = (IgbChatMessageReaction)ConvertReturnValue(args["detail"], "ChatMessageReaction", true); }
+ if (args != null && args.TryGetValue("detail", out var detailObj) && ConvertReturnValue(detailObj, "ChatMessageReaction", true) is IgbChatMessageReaction detail)
+ { this.Detail = detail; }
this.SuppressParentNotify = false;
}
diff --git a/src/components/Blazor/ChatMessageRenderContext.cs b/src/components/Blazor/ChatMessageRenderContext.cs
index c3adfe14..1045ea0b 100644
--- a/src/components/Blazor/ChatMessageRenderContext.cs
+++ b/src/components/Blazor/ChatMessageRenderContext.cs
@@ -10,7 +10,7 @@ public partial class IgbChatMessageRenderContext : BaseRendererElement
///
public override string Type { get { return "WebChatMessageRenderContext"; } }
- private IgbChatMessage _message;
+ private IgbChatMessage _message = new IgbChatMessage();
///
/// The specific chat message being rendered.
@@ -26,11 +26,11 @@ public IgbChatMessage Message
{
this.DetachChild(this._message);
}
+ this._message = value;
if (value != null)
{
this.AttachChild(value);
}
- this._message = value;
}
}
diff --git a/src/components/Blazor/ChatOptions.cs b/src/components/Blazor/ChatOptions.cs
index 1c5ee690..341ec5a4 100644
--- a/src/components/Blazor/ChatOptions.cs
+++ b/src/components/Blazor/ChatOptions.cs
@@ -10,13 +10,13 @@ public partial class IgbChatOptions : BaseRendererElement
///
public override string Type { get { return "WebChatOptions"; } }
- private string _currentUserId;
+ private string? _currentUserId;
///
/// The ID of the current user. Used to differentiate between incoming and outgoing messages.
///
[Parameter]
- public string CurrentUserId
+ public string? CurrentUserId
{
get { return this._currentUserId; }
set
@@ -87,13 +87,13 @@ public bool IsTyping
}
}
- private string _headerText;
+ private string? _headerText;
///
/// Optional header text to display at the top of the chat component.
///
[Parameter]
- public string HeaderText
+ public string? HeaderText
{
get { return this._headerText; }
set
@@ -106,14 +106,14 @@ public string HeaderText
}
}
- private string _inputPlaceholder;
+ private string? _inputPlaceholder;
///
/// Optional placeholder text for the chat input area.
/// Provides a hint to the user about what they can type (e.g. "Type a message...").
///
[Parameter]
- public string InputPlaceholder
+ public string? InputPlaceholder
{
get { return this._inputPlaceholder; }
set
@@ -126,7 +126,7 @@ public string InputPlaceholder
}
}
- private string[] _suggestions;
+ private string[] _suggestions = Array.Empty();
///
/// Suggested text snippets or quick replies that can be shown as user-selectable options.
@@ -216,13 +216,13 @@ public bool AdoptRootStyles
}
}
- private IgbChatRenderers _renderers;
+ private IgbChatRenderers? _renderers;
///
/// An object containing a collection of custom renderers for different parts of the chat UI.
///
[Parameter]
- public IgbChatRenderers Renderers
+ public IgbChatRenderers? Renderers
{
get { return this._renderers; }
set
diff --git a/src/components/Blazor/ChatRenderContext.cs b/src/components/Blazor/ChatRenderContext.cs
index 51807cc9..7d493c61 100644
--- a/src/components/Blazor/ChatRenderContext.cs
+++ b/src/components/Blazor/ChatRenderContext.cs
@@ -11,7 +11,7 @@ public partial class IgbChatRenderContext : BaseRendererElement
///
public override string Type { get { return "WebChatRenderContext"; } }
- private IgbChat _instance;
+ private IgbChat _instance = new IgbChat();
///
/// The instance of the component.
diff --git a/src/components/Blazor/ChatRenderers.cs b/src/components/Blazor/ChatRenderers.cs
index 49f3c7c0..cb4348b5 100644
--- a/src/components/Blazor/ChatRenderers.cs
+++ b/src/components/Blazor/ChatRenderers.cs
@@ -7,14 +7,14 @@ public partial class IgbChatRenderers : BaseRendererElement
///
public override string Type { get { return "WebChatRenderers"; } }
- private string _attachmentRef;
- private RenderFragment _attachment;
+ private string? _attachmentRef;
+ private RenderFragment? _attachment;
///
/// Custom renderer for a single chat message attachment.
///
[Parameter]
- public RenderFragment Attachment
+ public RenderFragment? Attachment
{
get { return this._attachment; }
@@ -27,7 +27,7 @@ public RenderFragment Attachment
this._attachment = value;
this._attachmentTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._attachmentTemplateId, this._attachment, typeof(IgbChatAttachmentRenderContext));
- this.OnRefChanged("Attachment", null, "template:::" + this._attachmentTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("Attachment", null, "template:::" + this._attachmentTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._attachmentRef = refName;
this.MarkPropDirty("AttachmentRef");
@@ -36,8 +36,8 @@ public RenderFragment Attachment
}
}
- private string _attachmentTemplateId;
- private string _attachmentScript;
+ private string? _attachmentTemplateId;
+ private string? _attachmentScript;
///
/// Name of a client-side function that renders a single chat message attachment.
@@ -47,7 +47,7 @@ public RenderFragment Attachment
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string AttachmentScript
+ public string? AttachmentScript
{
get { return _attachmentScript; }
@@ -58,7 +58,7 @@ public string AttachmentScript
{
this._attachmentScript = value;
MarkPropDirty("Attachment");
- this.OnRefChanged("Attachment", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("Attachment", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._attachmentRef = refName;
this.MarkPropDirty("AttachmentRef");
@@ -66,14 +66,14 @@ public string AttachmentScript
}
}
}
- private string _attachmentContentRef;
- private RenderFragment _attachmentContent;
+ private string? _attachmentContentRef;
+ private RenderFragment? _attachmentContent;
///
/// Custom renderer for the content of an attachment.
///
[Parameter]
- public RenderFragment AttachmentContent
+ public RenderFragment? AttachmentContent
{
get { return this._attachmentContent; }
@@ -86,7 +86,7 @@ public RenderFragment AttachmentContent
this._attachmentContent = value;
this._attachmentContentTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._attachmentContentTemplateId, this._attachmentContent, typeof(IgbChatAttachmentRenderContext));
- this.OnRefChanged("AttachmentContent", null, "template:::" + this._attachmentContentTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("AttachmentContent", null, "template:::" + this._attachmentContentTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._attachmentContentRef = refName;
this.MarkPropDirty("AttachmentContentRef");
@@ -95,8 +95,8 @@ public RenderFragment AttachmentContent
}
}
- private string _attachmentContentTemplateId;
- private string _attachmentContentScript;
+ private string? _attachmentContentTemplateId;
+ private string? _attachmentContentScript;
///
/// Name of a client-side function that renders the content of an attachment.
@@ -106,7 +106,7 @@ public RenderFragment AttachmentContent
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string AttachmentContentScript
+ public string? AttachmentContentScript
{
get { return _attachmentContentScript; }
@@ -117,7 +117,7 @@ public string AttachmentContentScript
{
this._attachmentContentScript = value;
MarkPropDirty("AttachmentContent");
- this.OnRefChanged("AttachmentContent", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("AttachmentContent", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._attachmentContentRef = refName;
this.MarkPropDirty("AttachmentContentRef");
@@ -125,14 +125,14 @@ public string AttachmentContentScript
}
}
}
- private string _attachmentHeaderRef;
- private RenderFragment _attachmentHeader;
+ private string? _attachmentHeaderRef;
+ private RenderFragment? _attachmentHeader;
///
/// Custom renderer for the header of an attachment.
///
[Parameter]
- public RenderFragment AttachmentHeader
+ public RenderFragment? AttachmentHeader
{
get { return this._attachmentHeader; }
@@ -145,7 +145,7 @@ public RenderFragment AttachmentHeader
this._attachmentHeader = value;
this._attachmentHeaderTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._attachmentHeaderTemplateId, this._attachmentHeader, typeof(IgbChatAttachmentRenderContext));
- this.OnRefChanged("AttachmentHeader", null, "template:::" + this._attachmentHeaderTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("AttachmentHeader", null, "template:::" + this._attachmentHeaderTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._attachmentHeaderRef = refName;
this.MarkPropDirty("AttachmentHeaderRef");
@@ -154,8 +154,8 @@ public RenderFragment AttachmentHeader
}
}
- private string _attachmentHeaderTemplateId;
- private string _attachmentHeaderScript;
+ private string? _attachmentHeaderTemplateId;
+ private string? _attachmentHeaderScript;
///
/// Name of a client-side function that renders the header of an attachment.
@@ -165,7 +165,7 @@ public RenderFragment AttachmentHeader
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string AttachmentHeaderScript
+ public string? AttachmentHeaderScript
{
get { return _attachmentHeaderScript; }
@@ -176,7 +176,7 @@ public string AttachmentHeaderScript
{
this._attachmentHeaderScript = value;
MarkPropDirty("AttachmentHeader");
- this.OnRefChanged("AttachmentHeader", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("AttachmentHeader", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._attachmentHeaderRef = refName;
this.MarkPropDirty("AttachmentHeaderRef");
@@ -184,14 +184,14 @@ public string AttachmentHeaderScript
}
}
}
- private string _inputRef;
- private RenderFragment _input;
+ private string? _inputRef;
+ private RenderFragment? _input;
///
/// Custom renderer for the main chat input field.
///
[Parameter]
- public RenderFragment Input
+ public RenderFragment? Input
{
get { return this._input; }
@@ -204,7 +204,7 @@ public RenderFragment Input
this._input = value;
this._inputTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._inputTemplateId, this._input, typeof(IgbChatInputRenderContext));
- this.OnRefChanged("Input", null, "template:::" + this._inputTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("Input", null, "template:::" + this._inputTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._inputRef = refName;
this.MarkPropDirty("InputRef");
@@ -213,8 +213,8 @@ public RenderFragment Input
}
}
- private string _inputTemplateId;
- private string _inputScript;
+ private string? _inputTemplateId;
+ private string? _inputScript;
///
/// Name of a client-side function that renders the main chat input field.
@@ -224,7 +224,7 @@ public RenderFragment Input
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string InputScript
+ public string? InputScript
{
get { return _inputScript; }
@@ -235,7 +235,7 @@ public string InputScript
{
this._inputScript = value;
MarkPropDirty("Input");
- this.OnRefChanged("Input", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("Input", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._inputRef = refName;
this.MarkPropDirty("InputRef");
@@ -243,14 +243,14 @@ public string InputScript
}
}
}
- private string _inputActionsRef;
- private RenderFragment _inputActions;
+ private string? _inputActionsRef;
+ private RenderFragment? _inputActions;
///
/// Custom renderer for the actions container within the input area.
///
[Parameter]
- public RenderFragment InputActions
+ public RenderFragment? InputActions
{
get { return this._inputActions; }
@@ -263,7 +263,7 @@ public RenderFragment InputActions
this._inputActions = value;
this._inputActionsTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._inputActionsTemplateId, this._inputActions, typeof(IgbChatRenderContext));
- this.OnRefChanged("InputActions", null, "template:::" + this._inputActionsTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("InputActions", null, "template:::" + this._inputActionsTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._inputActionsRef = refName;
this.MarkPropDirty("InputActionsRef");
@@ -272,8 +272,8 @@ public RenderFragment InputActions
}
}
- private string _inputActionsTemplateId;
- private string _inputActionsScript;
+ private string? _inputActionsTemplateId;
+ private string? _inputActionsScript;
///
/// Name of a client-side function that renders the actions container within the input area.
@@ -283,7 +283,7 @@ public RenderFragment InputActions
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string InputActionsScript
+ public string? InputActionsScript
{
get { return _inputActionsScript; }
@@ -294,7 +294,7 @@ public string InputActionsScript
{
this._inputActionsScript = value;
MarkPropDirty("InputActions");
- this.OnRefChanged("InputActions", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("InputActions", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._inputActionsRef = refName;
this.MarkPropDirty("InputActionsRef");
@@ -302,14 +302,14 @@ public string InputActionsScript
}
}
}
- private string _inputActionsEndRef;
- private RenderFragment _inputActionsEnd;
+ private string? _inputActionsEndRef;
+ private RenderFragment? _inputActionsEnd;
///
/// Custom renderer for the actions at the end of the input area.
///
[Parameter]
- public RenderFragment InputActionsEnd
+ public RenderFragment? InputActionsEnd
{
get { return this._inputActionsEnd; }
@@ -322,7 +322,7 @@ public RenderFragment InputActionsEnd
this._inputActionsEnd = value;
this._inputActionsEndTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._inputActionsEndTemplateId, this._inputActionsEnd, typeof(IgbChatRenderContext));
- this.OnRefChanged("InputActionsEnd", null, "template:::" + this._inputActionsEndTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("InputActionsEnd", null, "template:::" + this._inputActionsEndTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._inputActionsEndRef = refName;
this.MarkPropDirty("InputActionsEndRef");
@@ -331,8 +331,8 @@ public RenderFragment InputActionsEnd
}
}
- private string _inputActionsEndTemplateId;
- private string _inputActionsEndScript;
+ private string? _inputActionsEndTemplateId;
+ private string? _inputActionsEndScript;
///
/// Name of a client-side function that renders the actions at the end of the input area.
@@ -342,7 +342,7 @@ public RenderFragment InputActionsEnd
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string InputActionsEndScript
+ public string? InputActionsEndScript
{
get { return _inputActionsEndScript; }
@@ -353,7 +353,7 @@ public string InputActionsEndScript
{
this._inputActionsEndScript = value;
MarkPropDirty("InputActionsEnd");
- this.OnRefChanged("InputActionsEnd", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("InputActionsEnd", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._inputActionsEndRef = refName;
this.MarkPropDirty("InputActionsEndRef");
@@ -361,14 +361,14 @@ public string InputActionsEndScript
}
}
}
- private string _inputActionsStartRef;
- private RenderFragment _inputActionsStart;
+ private string? _inputActionsStartRef;
+ private RenderFragment? _inputActionsStart;
///
/// Custom renderer for the actions at the start of the input area.
///
[Parameter]
- public RenderFragment InputActionsStart
+ public RenderFragment? InputActionsStart
{
get { return this._inputActionsStart; }
@@ -381,7 +381,7 @@ public RenderFragment InputActionsStart
this._inputActionsStart = value;
this._inputActionsStartTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._inputActionsStartTemplateId, this._inputActionsStart, typeof(IgbChatRenderContext));
- this.OnRefChanged("InputActionsStart", null, "template:::" + this._inputActionsStartTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("InputActionsStart", null, "template:::" + this._inputActionsStartTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._inputActionsStartRef = refName;
this.MarkPropDirty("InputActionsStartRef");
@@ -390,8 +390,8 @@ public RenderFragment InputActionsStart
}
}
- private string _inputActionsStartTemplateId;
- private string _inputActionsStartScript;
+ private string? _inputActionsStartTemplateId;
+ private string? _inputActionsStartScript;
///
/// Name of a client-side function that renders the actions at the start of the input area.
@@ -401,7 +401,7 @@ public RenderFragment InputActionsStart
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string InputActionsStartScript
+ public string? InputActionsStartScript
{
get { return _inputActionsStartScript; }
@@ -412,7 +412,7 @@ public string InputActionsStartScript
{
this._inputActionsStartScript = value;
MarkPropDirty("InputActionsStart");
- this.OnRefChanged("InputActionsStart", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("InputActionsStart", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._inputActionsStartRef = refName;
this.MarkPropDirty("InputActionsStartRef");
@@ -420,14 +420,14 @@ public string InputActionsStartScript
}
}
}
- private string _messageRef;
- private RenderFragment _message;
+ private string? _messageRef;
+ private RenderFragment? _message;
///
/// Custom renderer for an entire chat message bubble.
///
[Parameter]
- public RenderFragment Message
+ public RenderFragment? Message
{
get { return this._message; }
@@ -440,7 +440,7 @@ public RenderFragment Message
this._message = value;
this._messageTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._messageTemplateId, this._message, typeof(IgbChatMessageRenderContext));
- this.OnRefChanged("Message", null, "template:::" + this._messageTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("Message", null, "template:::" + this._messageTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._messageRef = refName;
this.MarkPropDirty("MessageRef");
@@ -449,8 +449,8 @@ public RenderFragment Message
}
}
- private string _messageTemplateId;
- private string _messageScript;
+ private string? _messageTemplateId;
+ private string? _messageScript;
///
/// Name of a client-side function that renders an entire chat message bubble.
@@ -460,7 +460,7 @@ public RenderFragment Message
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string MessageScript
+ public string? MessageScript
{
get { return _messageScript; }
@@ -471,7 +471,7 @@ public string MessageScript
{
this._messageScript = value;
MarkPropDirty("Message");
- this.OnRefChanged("Message", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("Message", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._messageRef = refName;
this.MarkPropDirty("MessageRef");
@@ -479,14 +479,14 @@ public string MessageScript
}
}
}
- private string _messageActionsRef;
- private RenderFragment _messageActions;
+ private string? _messageActionsRef;
+ private RenderFragment? _messageActions;
///
/// Custom renderer for message-specific actions (e.g. reply or delete buttons).
///
[Parameter]
- public RenderFragment MessageActions
+ public RenderFragment? MessageActions
{
get { return this._messageActions; }
@@ -499,7 +499,7 @@ public RenderFragment MessageActions
this._messageActions = value;
this._messageActionsTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._messageActionsTemplateId, this._messageActions, typeof(IgbChatMessageRenderContext));
- this.OnRefChanged("MessageActions", null, "template:::" + this._messageActionsTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("MessageActions", null, "template:::" + this._messageActionsTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._messageActionsRef = refName;
this.MarkPropDirty("MessageActionsRef");
@@ -508,8 +508,8 @@ public RenderFragment MessageActions
}
}
- private string _messageActionsTemplateId;
- private string _messageActionsScript;
+ private string? _messageActionsTemplateId;
+ private string? _messageActionsScript;
///
/// Name of a client-side function that renders message-specific actions (e.g. reply or delete buttons).
@@ -519,7 +519,7 @@ public RenderFragment MessageActions
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string MessageActionsScript
+ public string? MessageActionsScript
{
get { return _messageActionsScript; }
@@ -530,7 +530,7 @@ public string MessageActionsScript
{
this._messageActionsScript = value;
MarkPropDirty("MessageActions");
- this.OnRefChanged("MessageActions", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("MessageActions", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._messageActionsRef = refName;
this.MarkPropDirty("MessageActionsRef");
@@ -538,14 +538,14 @@ public string MessageActionsScript
}
}
}
- private string _messageAttachmentsRef;
- private RenderFragment _messageAttachments;
+ private string? _messageAttachmentsRef;
+ private RenderFragment? _messageAttachments;
///
/// Custom renderer for the attachments associated with a message.
///
[Parameter]
- public RenderFragment MessageAttachments
+ public RenderFragment? MessageAttachments
{
get { return this._messageAttachments; }
@@ -558,7 +558,7 @@ public RenderFragment MessageAttachments
this._messageAttachments = value;
this._messageAttachmentsTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._messageAttachmentsTemplateId, this._messageAttachments, typeof(IgbChatMessageRenderContext));
- this.OnRefChanged("MessageAttachments", null, "template:::" + this._messageAttachmentsTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("MessageAttachments", null, "template:::" + this._messageAttachmentsTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._messageAttachmentsRef = refName;
this.MarkPropDirty("MessageAttachmentsRef");
@@ -567,8 +567,8 @@ public RenderFragment MessageAttachments
}
}
- private string _messageAttachmentsTemplateId;
- private string _messageAttachmentsScript;
+ private string? _messageAttachmentsTemplateId;
+ private string? _messageAttachmentsScript;
///
/// Name of a client-side function that renders the attachments associated with a message.
@@ -578,7 +578,7 @@ public RenderFragment MessageAttachments
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string MessageAttachmentsScript
+ public string? MessageAttachmentsScript
{
get { return _messageAttachmentsScript; }
@@ -589,7 +589,7 @@ public string MessageAttachmentsScript
{
this._messageAttachmentsScript = value;
MarkPropDirty("MessageAttachments");
- this.OnRefChanged("MessageAttachments", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("MessageAttachments", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._messageAttachmentsRef = refName;
this.MarkPropDirty("MessageAttachmentsRef");
@@ -597,14 +597,14 @@ public string MessageAttachmentsScript
}
}
}
- private string _messageContentRef;
- private RenderFragment _messageContent;
+ private string? _messageContentRef;
+ private RenderFragment? _messageContent;
///
/// Custom renderer for the main text and content of a message.
///
[Parameter]
- public RenderFragment MessageContent
+ public RenderFragment? MessageContent
{
get { return this._messageContent; }
@@ -617,7 +617,7 @@ public RenderFragment MessageContent
this._messageContent = value;
this._messageContentTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._messageContentTemplateId, this._messageContent, typeof(IgbChatMessageRenderContext));
- this.OnRefChanged("MessageContent", null, "template:::" + this._messageContentTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("MessageContent", null, "template:::" + this._messageContentTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._messageContentRef = refName;
this.MarkPropDirty("MessageContentRef");
@@ -626,8 +626,8 @@ public RenderFragment MessageContent
}
}
- private string _messageContentTemplateId;
- private string _messageContentScript;
+ private string? _messageContentTemplateId;
+ private string? _messageContentScript;
///
/// Name of a client-side function that renders the main text and content of a message.
@@ -637,7 +637,7 @@ public RenderFragment MessageContent
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string MessageContentScript
+ public string? MessageContentScript
{
get { return _messageContentScript; }
@@ -648,7 +648,7 @@ public string MessageContentScript
{
this._messageContentScript = value;
MarkPropDirty("MessageContent");
- this.OnRefChanged("MessageContent", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("MessageContent", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._messageContentRef = refName;
this.MarkPropDirty("MessageContentRef");
@@ -656,14 +656,14 @@ public string MessageContentScript
}
}
}
- private string _messageHeaderRef;
- private RenderFragment _messageHeader;
+ private string? _messageHeaderRef;
+ private RenderFragment? _messageHeader;
///
/// Custom renderer for the header of a message, including sender and timestamp.
///
[Parameter]
- public RenderFragment MessageHeader
+ public RenderFragment? MessageHeader
{
get { return this._messageHeader; }
@@ -676,7 +676,7 @@ public RenderFragment MessageHeader
this._messageHeader = value;
this._messageHeaderTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._messageHeaderTemplateId, this._messageHeader, typeof(IgbChatMessageRenderContext));
- this.OnRefChanged("MessageHeader", null, "template:::" + this._messageHeaderTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("MessageHeader", null, "template:::" + this._messageHeaderTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._messageHeaderRef = refName;
this.MarkPropDirty("MessageHeaderRef");
@@ -685,8 +685,8 @@ public RenderFragment MessageHeader
}
}
- private string _messageHeaderTemplateId;
- private string _messageHeaderScript;
+ private string? _messageHeaderTemplateId;
+ private string? _messageHeaderScript;
///
/// Name of a client-side function that renders the header of a message, including sender and timestamp.
@@ -696,7 +696,7 @@ public RenderFragment MessageHeader
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string MessageHeaderScript
+ public string? MessageHeaderScript
{
get { return _messageHeaderScript; }
@@ -707,7 +707,7 @@ public string MessageHeaderScript
{
this._messageHeaderScript = value;
MarkPropDirty("MessageHeader");
- this.OnRefChanged("MessageHeader", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("MessageHeader", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._messageHeaderRef = refName;
this.MarkPropDirty("MessageHeaderRef");
@@ -715,14 +715,14 @@ public string MessageHeaderScript
}
}
}
- private string _sendButtonRef;
- private RenderFragment _sendButton;
+ private string? _sendButtonRef;
+ private RenderFragment? _sendButton;
///
/// Custom renderer for the message send button.
///
[Parameter]
- public RenderFragment SendButton
+ public RenderFragment? SendButton
{
get { return this._sendButton; }
@@ -735,7 +735,7 @@ public RenderFragment SendButton
this._sendButton = value;
this._sendButtonTemplateId = Guid.NewGuid().ToString();
this.UpdateTemplate(this._sendButtonTemplateId, this._sendButton, typeof(IgbChatRenderContext));
- this.OnRefChanged("SendButton", null, "template:::" + this._sendButtonTemplateId, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("SendButton", null, "template:::" + this._sendButtonTemplateId, true, false, (string refName, object? old, object? newValue) =>
{
this._sendButtonRef = refName;
this.MarkPropDirty("SendButtonRef");
@@ -744,8 +744,8 @@ public RenderFragment SendButton
}
}
- private string _sendButtonTemplateId;
- private string _sendButtonScript;
+ private string? _sendButtonTemplateId;
+ private string? _sendButtonScript;
///
/// Name of a client-side function that renders the message send button.
@@ -755,7 +755,7 @@ public RenderFragment SendButton
/// igRegisterScript("MyTemplate", function (ctx) { return ...; }, false).
///
[Parameter]
- public string SendButtonScript
+ public string? SendButtonScript
{
get { return _sendButtonScript; }
@@ -766,7 +766,7 @@ public string SendButtonScript
{
this._sendButtonScript = value;
MarkPropDirty("SendButton");
- this.OnRefChanged("SendButton", oldValue, value, true, false, (string refName, object old, object newValue) =>
+ this.OnRefChanged("SendButton", oldValue, value, true, false, (string refName, object? old, object? newValue) =>
{
this._sendButtonRef = refName;
this.MarkPropDirty("SendButtonRef");
@@ -774,14 +774,14 @@ public string SendButtonScript
}
}
}
- private string _suggestionPrefixRef;
- private RenderFragment _suggestionPrefix;
+ private string? _suggestionPrefixRef;
+ private RenderFragment? _suggestionPrefix;
///
/// Custom renderer for the prefix text shown before suggestions.
///
[Parameter]
- public RenderFragment SuggestionPrefix
+ public RenderFragment