Ensure that the component is currently loaded. The loaded component. This is equivalent to the Get() method in Java version.
()
| 70 | /// <returns>The loaded component.</returns> |
| 71 | /// <remarks>This is equivalent to the Get() method in Java version.</remarks> |
| 72 | public virtual T Load() |
| 73 | { |
| 74 | if (this.IsLoaded) |
| 75 | { |
| 76 | return (T)this; |
| 77 | } |
| 78 | else |
| 79 | { |
| 80 | this.TryLoad(); |
| 81 | } |
| 82 | |
| 83 | if (!this.IsLoaded) |
| 84 | { |
| 85 | throw new LoadableComponentException(this.UnableToLoadMessage); |
| 86 | } |
| 87 | |
| 88 | return (T)this; |
| 89 | } |
| 90 | |
| 91 | /// <summary> |
| 92 | /// Ensure that the component is currently loaded. |