Beispiel #1
0
        public IEnumerable <ShortcutCreationRequest> GetAppShortcutList()
        {
            if (shouldThrow())
            {
                throw new IOException();
            }

            var shortCutDir = getEnvVar("ShortcutDir");

            if (String.IsNullOrWhiteSpace(shortCutDir))
            {
                return(Enumerable.Empty <ShortcutCreationRequest>());
            }

            var ret = new ShortcutCreationRequest()
            {
                Arguments        = "--foo",
                Description      = "A test app",
                CreationLocation = ShortcutCreationLocation.Custom,
                CustomLocation   = shortCutDir,
                IconLibrary      = Assembly.GetExecutingAssembly().Location,
                IconIndex        = 0,
                TargetPath       = Assembly.GetExecutingAssembly().Location,
                Title            = "Foo",
            };

            return(new[] { ret });
        }
Beispiel #2
0
        public IEnumerable<ShortcutCreationRequest> GetAppShortcutList()
        {
            if (shouldThrow()) {
                throw new IOException();
            }

            var shortCutDir = getEnvVar("ShortcutDir");
            if (String.IsNullOrWhiteSpace(shortCutDir)) {
                return Enumerable.Empty<ShortcutCreationRequest>();
            }

            var ret = new ShortcutCreationRequest {
                Arguments = "--foo",
                Description = "A test app",
                CreationLocation = ShortcutCreationLocation.Custom,
                CustomLocation = shortCutDir,
                IconLibrary = Assembly.GetExecutingAssembly().Location,
                IconIndex = 0,
                TargetPath = Assembly.GetExecutingAssembly().Location,
                Title = "Foo",
            };

            return new[] { ret };
        }