Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial AppDirectory POCOs. #58

Merged
merged 6 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
run:
dotnet pack src/Fdc3.NewtonsoftJson/MorganStanley.Fdc3.NewtonsoftJson.csproj --no-build --configuration Release --output packages

- name: Pack Fdc3.AppDirectory
run:
dotnet pack src/Fdc3.AppDirectory/MorganStanley.Fdc3.AppDirectory.csproj --no-build --configuration Release --output packages

- name: Upload
uses: actions/upload-artifact@v3
with:
Expand Down
57 changes: 57 additions & 0 deletions src/Fdc3.AppDirectory/AppChannel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/*
* 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.
*/

using System;
using System.Collections.Generic;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// Describes the application's use of App Channels.
/// This metadata is not currently used by the desktop agent, but is provided
/// to help find apps that will interoperate with this app and to document API
/// interactions for use by other app developers.
/// </summary>
public class AppChannel
{
/// <summary>
/// Initializes a new instance of the <see cref="AppChannel"/> class.
/// </summary>
/// <param name="name">The name</param>
/// <exception cref="ArgumentNullException">Exception if name is null</exception>
public AppChannel(string name)
{
Name = name ?? throw new ArgumentNullException(nameof(name));
}
/// <summary>
/// The name of the App Channel.
/// </summary>
public string Name { get; set; }

/// <summary>
/// A description of how the channel is used.
/// </summary>
public string? Description { get; set; }

/// <summary>
/// Context type names that are broadcast by the application on the channel.
/// </summary>
public IEnumerable<string>? Broadcasts { get; set; }

/// <summary>
/// Context type names that the application listens for on the channel.
/// </summary>
public IEnumerable<string>? ListensFor { get; set; }
}
}
46 changes: 46 additions & 0 deletions src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* 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.
*/

using System;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// App virtualized via Citrix.
/// </summary>
public class CitrixAppDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="CitrixAppDetails"/> class.
/// </summary>
/// <param name="alias">The alias</param>
/// <param name="arguments">The arguments</param>
/// <exception cref="ArgumentNullException">Exception if the alias is null</exception>
public CitrixAppDetails(string alias, string? arguments)

Check warning on line 30 in src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs#L30

Added line #L30 was not covered by tests
{
Alias = alias ?? throw new ArgumentNullException(nameof(alias));
Arguments = arguments;
}

Check warning on line 34 in src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs#L32-L34

Added lines #L32 - L34 were not covered by tests

/// <summary>
/// The Citrix alias / name of the virtual app (passed to the Citrix SelfService qlaunch parameter).
/// </summary>
public string Alias { get; set; }

Check warning on line 39 in src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs#L39

Added line #L39 was not covered by tests

/// <summary>
/// Arguments that must be passed on the command line to launch the app in the expected configuration.
/// </summary>
public string? Arguments { get; set; }

Check warning on line 44 in src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/CitrixAppDetails.cs#L44

Added line #L44 was not covered by tests
}
}
45 changes: 45 additions & 0 deletions src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.
*/

using System;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// Native application pre-installed on a device and launch via a filesystem path.
/// </summary>
public class NativeAppDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="NativeAppDetails"/> class.
/// </summary>
/// <param name="path">The path</param>
/// <param name="arguments">The arguments</param>
/// <exception cref="ArgumentNullException">Exception if the path is null</exception>
public NativeAppDetails(string path, string? arguments)

Check warning on line 30 in src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs#L30

Added line #L30 was not covered by tests
{
Path = path ?? throw new ArgumentNullException(nameof(path));
Arguments = arguments;
}

Check warning on line 34 in src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs#L32-L34

Added lines #L32 - L34 were not covered by tests
/// <summary>
/// The path on disk from which the application is launched.
/// </summary>
public string Path { get; set; }

Check warning on line 38 in src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs#L38

Added line #L38 was not covered by tests

/// <summary>
/// Arguments that must be passed on the command line to launch the app in the expected configuration.
/// </summary>
public string? Arguments { get; set; }

Check warning on line 43 in src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/NativeAppDetails.cs#L43

Added line #L43 was not covered by tests
}
}
38 changes: 38 additions & 0 deletions src/Fdc3.AppDirectory/AppDetails/OnlineNativeAppDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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.
*/

using System;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// Native app that have an online launcher, e.g. online ClickOnce app deployments.
/// </summary>
public class OnlineNativeAppDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="OnlineNativeAppDetails"/> class.
/// </summary>
/// <param name="url">The url</param>
/// <exception cref="ArgumentNullException">Exception if the url is null</exception>
public OnlineNativeAppDetails(string url)

Check warning on line 29 in src/Fdc3.AppDirectory/AppDetails/OnlineNativeAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/OnlineNativeAppDetails.cs#L29

Added line #L29 was not covered by tests
{
Url = url ?? throw new ArgumentNullException(nameof(url));
}

Check warning on line 32 in src/Fdc3.AppDirectory/AppDetails/OnlineNativeAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/OnlineNativeAppDetails.cs#L31-L32

Added lines #L31 - L32 were not covered by tests
/// <summary>
/// Application URL.
/// </summary>
public string Url { get; set; }

Check warning on line 36 in src/Fdc3.AppDirectory/AppDetails/OnlineNativeAppDetails.cs

View check run for this annotation

Codecov / codecov/patch

src/Fdc3.AppDirectory/AppDetails/OnlineNativeAppDetails.cs#L36

Added line #L36 was not covered by tests
}
}
40 changes: 40 additions & 0 deletions src/Fdc3.AppDirectory/AppDetails/WebAppDetails.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* 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.
*/

using System;

namespace MorganStanley.Fdc3.AppDirectory
{
/// <summary>
/// Web application launched via a URL.
/// </summary>
public class WebAppDetails
{
/// <summary>
/// Initializes a new instance of the <see cref="WebAppDetails"/> class.
/// </summary>
/// <param name="url">The url</param>
/// <exception cref="ArgumentNullException">Exception if the url is null</exception>
public WebAppDetails(string url)
{
Url = url ?? throw new ArgumentNullException(nameof(url));
}

/// <summary>
/// <summary>
/// Application start URL.
/// </summary>
public string Url { get; set; }
}
}
28 changes: 28 additions & 0 deletions src/Fdc3.AppDirectory/AppType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* 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.Fdc3.AppDirectory
{
/// <summary>
/// FDC3 application types
/// </summary>
public enum AppType
{
Other,
Web,
fhubi marked this conversation as resolved.
Show resolved Hide resolved
Native,
Citrix,
OnlineNative
}
}
Loading
Loading