-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Remove_duplicate_versions
- Loading branch information
Showing
11 changed files
with
191 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...le-loader/dotnet/src/MorganStanley.ComposeUI.ModuleLoader.Abstractions/IModuleInstance.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Morgan Stanley makes this available to you under the Apache License, | ||
// Version 2.0 (the "License"). You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// See the NOTICE file distributed with this work for additional information | ||
// regarding copyright ownership. Unless required by applicable law or agreed | ||
// to in writing, software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
// or implied. See the License for the specific language governing permissions | ||
// and limitations under the License. | ||
|
||
namespace MorganStanley.ComposeUI.ModuleLoader; | ||
|
||
/// <summary> | ||
/// Represents a running instance of a module. | ||
/// </summary> | ||
public interface IModuleInstance | ||
{ | ||
/// <summary> | ||
/// Gets the unique ID of the module instance. | ||
/// </summary> | ||
Guid InstanceId { get; } | ||
|
||
/// <summary> | ||
/// Gets the manifest of the module. | ||
/// </summary> | ||
IModuleManifest Manifest { get; } | ||
|
||
/// <summary> | ||
/// Gets the original <see cref="StartRequest"/> that was used to start the module. | ||
/// </summary> | ||
StartRequest StartRequest { get; } | ||
|
||
/// <summary> | ||
/// Gets the properties of type <typeparamref name="T"/> attached to the module instance. | ||
/// </summary> | ||
/// <typeparam name="T">The type of the properties to get</typeparam> | ||
/// <returns>The collection of properties of the specified type, in the order they were added to the <see cref="StartupContext"/></returns> | ||
IEnumerable<T> GetProperties<T>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/module-loader/dotnet/src/MorganStanley.ComposeUI.ModuleLoader.Abstractions/ModuleType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Morgan Stanley makes this available to you under the Apache License, | ||
// Version 2.0 (the "License"). You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// See the NOTICE file distributed with this work for additional information | ||
// regarding copyright ownership. Unless required by applicable law or agreed | ||
// to in writing, software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
// or implied. See the License for the specific language governing permissions | ||
// and limitations under the License. | ||
|
||
namespace MorganStanley.ComposeUI.ModuleLoader; | ||
|
||
/// <summary> | ||
/// Contains the predefined module types. | ||
/// </summary> | ||
public static class ModuleType | ||
{ | ||
public const string Native = "native"; | ||
public const string Web = "web"; | ||
} |
2 changes: 1 addition & 1 deletion
2
...poseUI.ModuleLoader.Abstractions/MorganStanley.ComposeUI.ModuleLoader.Abstractions.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...loader/dotnet/src/MorganStanley.ComposeUI.ModuleLoader.Abstractions/WebManifestDetails.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Morgan Stanley makes this available to you under the Apache License, | ||
// Version 2.0 (the "License"). You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// See the NOTICE file distributed with this work for additional information | ||
// regarding copyright ownership. Unless required by applicable law or agreed | ||
// to in writing, software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
// or implied. See the License for the specific language governing permissions | ||
// and limitations under the License. | ||
|
||
namespace MorganStanley.ComposeUI.ModuleLoader; | ||
|
||
/// <summary> | ||
/// Contains the manifest details for web modules. | ||
/// </summary> | ||
/// <remarks> | ||
/// Web modules should have <see cref="ModuleType.Web"/> as their <see cref="IModuleManifest.ModuleType"/> | ||
/// </remarks> | ||
public sealed class WebManifestDetails | ||
{ | ||
/// <summary> | ||
/// The URL to open when this module is started. | ||
/// </summary> | ||
public Uri Url { get; init; } | ||
|
||
/// <summary> | ||
/// The URL of the window icon, if any. | ||
/// </summary> | ||
public Uri? IconUrl { get; init; } | ||
} |
23 changes: 23 additions & 0 deletions
23
...ader/dotnet/src/MorganStanley.ComposeUI.ModuleLoader.Abstractions/WebStartupProperties.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Morgan Stanley makes this available to you under the Apache License, | ||
// Version 2.0 (the "License"). You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// See the NOTICE file distributed with this work for additional information | ||
// regarding copyright ownership. Unless required by applicable law or agreed | ||
// to in writing, software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
// or implied. See the License for the specific language governing permissions | ||
// and limitations under the License. | ||
|
||
namespace MorganStanley.ComposeUI.ModuleLoader; | ||
|
||
/// <summary> | ||
/// Contains the necessary properties to start a web module. | ||
/// This type is injected to <see cref="StartupContext"/>. | ||
/// </summary> | ||
public sealed class WebStartupProperties | ||
{ | ||
public Uri Url { get; set; } | ||
public Uri? IconUrl { get; set; } | ||
} |