Ejemplo n.º 1
0
        public void WhenGetEnumThenMustReturnSuccessResult(CreateAssemblyEnumFlags flasg)
        {
            IAssemblyEnum assemblyEnum;
            var           hresult = FusionNative.CreateAssemblyEnum(out assemblyEnum, null, null, flasg, 0);

            Assert.True(hresult);
            Assert.NotNull(assemblyEnum);
        }
Ejemplo n.º 2
0
        private static IAssemblyEnum GetGacAssemblyEnum(IAssemblyName assemblyName = null)
        {
            const CreateAssemblyEnumFlags flags = CreateAssemblyEnumFlags.Zap;
            IAssemblyEnum assemblyEnum;
            var           hresult = FusionNative.CreateAssemblyEnum(out assemblyEnum, null, assemblyName, flags, 0);

            Assert.True(hresult, "Couldn't create assembly enum object");
            return(assemblyEnum);
        }
Ejemplo n.º 3
0
        public void GetNextMustReturnAtLeastOneAssembly(CreateAssemblyEnumFlags flags)
        {
            IAssemblyEnum assemblyEnum;
            var           hresult = FusionNative.CreateAssemblyEnum(out assemblyEnum, null, null, flags, 0);

            Assert.True(hresult);

            IApplicationContext applicationContext;
            IAssemblyName       assemblyName;

            hresult = assemblyEnum.GetNextAssembly(out applicationContext, out assemblyName, GetNextAssemblyFlags.None);
            Assert.True(hresult);
            Assert.NotNull(assemblyName);
        }
Ejemplo n.º 4
0
        public void ResetNotImplemented(CreateAssemblyEnumFlags flags)
        {
            IAssemblyEnum assemblyEnum;
            var           hresult = FusionNative.CreateAssemblyEnum(out assemblyEnum, null, null, flags, 0);

            Assert.True(hresult);

            IApplicationContext applicationContext;
            IAssemblyName       firstAssemblyName;

            hresult = assemblyEnum.GetNextAssembly(out applicationContext, out firstAssemblyName, GetNextAssemblyFlags.None);
            Assert.True(hresult);
            Assert.NotNull(firstAssemblyName);

            hresult = assemblyEnum.Reset();
            Assert.Throws <NotImplementedException>(() => (bool)hresult);
        }
Ejemplo n.º 5
0
 public static extern HRESULT CreateAssemblyEnum(out IAssemblyEnum assemblyEnum,
                                                 IApplicationContext applicationContext, IAssemblyName assemblyName, CreateAssemblyEnumFlags flags, int reserved);