Skip to content

Commit bec8689

Browse files
authored
Merge pull request #46 from microsoft/csupdate
Cleaned up terminology to align with the docs and C++ sample
2 parents 586d4c0 + f541a9a commit bec8689

File tree

1 file changed

+11
-11
lines changed
  • Samples/PackageWithExternalLocation/cs/PhotoStoreDemo

1 file changed

+11
-11
lines changed

Samples/PackageWithExternalLocation/cs/PhotoStoreDemo/StartUp.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ public class StartUp
2020
[STAThread]
2121
public static void Main(string[] cmdArgs)
2222
{
23-
//if app isn't running with identity, register its sparse package
23+
//if app isn't running with identity, register its identity package
2424
if (!ExecutionMode.IsRunningWithIdentity())
2525
{
2626
//TODO - update the value of externalLocation to match the output location of your VS Build binaries and the value of
27-
//sparsePkgPath to match the path to your signed Sparse Package (.msix).
27+
//packagePath to match the path to your signed identity package (.msix).
2828
//Note that these values cannot be relative paths and must be complete paths
2929
string externalLocation = @"";
30-
string sparsePkgPath = @"";
30+
string packagePath = @"";
3131

3232
//Attempt registration
33-
if (registerSparsePackage(externalLocation, sparsePkgPath))
33+
if (RegisterPackageWithExternalLocation(externalLocation, packagePath))
3434
{
3535
//Registration succeded, restart the app to run with identity
3636
System.Diagnostics.Process.Start(Application.ResourceAssembly.Location, arguments: cmdArgs?.ToString());
@@ -46,7 +46,7 @@ public static void Main(string[] cmdArgs)
4646
}
4747
else //App is registered and running with identity, handle launch and activation
4848
{
49-
//Handle Sparse Package based activation e.g Share target activation or clicking on a Tile
49+
//Handle identity package based activation e.g Share target activation or clicking on a Tile
5050
// Launching the .exe directly will have activationArgs == null
5151
var activationArgs = AppInstance.GetActivatedEventArgs();
5252
if (activationArgs != null)
@@ -84,7 +84,7 @@ static void HandleLaunch(LaunchActivatedEventArgs args)
8484
Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
8585
Debug.AutoFlush = true;
8686
Debug.Indent();
87-
Debug.WriteLine("WPF App using a Sparse Package");
87+
Debug.WriteLine("WPF App using an identity package");
8888

8989

9090
SingleInstanceManager singleInstanceManager = new SingleInstanceManager();
@@ -143,16 +143,16 @@ static async void HandleShareAsync(ShareTargetActivatedEventArgs args)
143143
singleInstanceManager.Run(Environment.GetCommandLineArgs());
144144
}
145145

146-
private static bool registerSparsePackage(string externalLocation, string sparsePkgPath)
146+
private static bool RegisterPackageWithExternalLocation(string externalLocation, string packagePath)
147147
{
148148
bool registration = false;
149149
try
150150
{
151151
Uri externalUri = new Uri(externalLocation);
152-
Uri packageUri = new Uri(sparsePkgPath);
152+
Uri packageUri = new Uri(packagePath);
153153

154154
Console.WriteLine("exe Location {0}", externalLocation);
155-
Console.WriteLine("msix Address {0}", sparsePkgPath);
155+
Console.WriteLine("msix Address {0}", packagePath);
156156

157157
Console.WriteLine(" exe Uri {0}", externalUri);
158158
Console.WriteLine(" msix Uri {0}", packageUri);
@@ -169,7 +169,7 @@ private static bool registerSparsePackage(string externalLocation, string sparse
169169

170170
deploymentOperation.Completed = (depProgress, status) => { opCompletedEvent.Set(); };
171171

172-
Console.WriteLine("Installing package {0}", sparsePkgPath);
172+
Console.WriteLine("Installing package {0}", packagePath);
173173

174174
Debug.WriteLine("Waiting for package registration to complete...");
175175

@@ -207,7 +207,7 @@ private static bool registerSparsePackage(string externalLocation, string sparse
207207
return registration;
208208
}
209209

210-
private static void removeSparsePackage() //example of how to uninstall a Sparse Package
210+
private static void RemovePackageWithExternalLocation() //example of how to uninstall an identity package
211211
{
212212
PackageManager packageManager = new PackageManager();
213213
Windows.Foundation.IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> deploymentOperation = packageManager.RemovePackageAsync("PhotoStoreDemo_0.0.0.1_x86__rg009sv5qtcca");

0 commit comments

Comments
 (0)