1 write to _provider
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
39
_provider
= CreateProvider(CultureInfo.InvariantCulture);
41 references to _provider
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (41)
MetadataShadowCopyProviderTests.cs (41)
49
_provider
.Dispose();
50
Assert.False(Directory.Exists(
_provider
.ShadowCopyDirectory), "Shadow copy directory should have been deleted");
57
Assert.Throws<ArgumentNullException>(() =>
_provider
.NeedsShadowCopy(null));
58
Assert.Throws<ArgumentException>(() =>
_provider
.NeedsShadowCopy("c:goo.dll"));
59
Assert.Throws<ArgumentException>(() =>
_provider
.NeedsShadowCopy("bar.dll"));
60
Assert.Throws<ArgumentException>(() =>
_provider
.NeedsShadowCopy(@"\bar.dll"));
61
Assert.Throws<ArgumentException>(() =>
_provider
.NeedsShadowCopy(@"../bar.dll"));
63
Assert.Throws<ArgumentNullException>(() =>
_provider
.SuppressShadowCopy(null));
64
Assert.Throws<ArgumentException>(() =>
_provider
.SuppressShadowCopy("c:goo.dll"));
65
Assert.Throws<ArgumentException>(() =>
_provider
.SuppressShadowCopy("bar.dll"));
66
Assert.Throws<ArgumentException>(() =>
_provider
.SuppressShadowCopy(@"\bar.dll"));
67
Assert.Throws<ArgumentException>(() =>
_provider
.SuppressShadowCopy(@"../bar.dll"));
69
Assert.Throws<ArgumentOutOfRangeException>(() =>
_provider
.GetMetadataShadowCopy(IsRunningOnMono ? "/goo.dll" : @"c:\goo.dll", (MetadataImageKind)Byte.MaxValue));
70
Assert.Throws<ArgumentNullException>(() =>
_provider
.GetMetadataShadowCopy(null, MetadataImageKind.Assembly));
71
Assert.Throws<ArgumentException>(() =>
_provider
.GetMetadataShadowCopy("c:goo.dll", MetadataImageKind.Assembly));
72
Assert.Throws<ArgumentException>(() =>
_provider
.GetMetadataShadowCopy("bar.dll", MetadataImageKind.Assembly));
73
Assert.Throws<ArgumentException>(() =>
_provider
.GetMetadataShadowCopy(@"\bar.dll", MetadataImageKind.Assembly));
74
Assert.Throws<ArgumentException>(() =>
_provider
.GetMetadataShadowCopy(@"../bar.dll", MetadataImageKind.Assembly));
76
Assert.Throws<ArgumentOutOfRangeException>(() =>
_provider
.GetMetadata(IsRunningOnMono ? "/goo.dll" : @"c:\goo.dll", (MetadataImageKind)Byte.MaxValue));
77
Assert.Throws<ArgumentNullException>(() =>
_provider
.GetMetadata(null, MetadataImageKind.Assembly));
78
Assert.Throws<ArgumentException>(() =>
_provider
.GetMetadata("c:goo.dll", MetadataImageKind.Assembly));
88
var sc1 =
_provider
.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly);
89
var sc2 =
_provider
.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly);
105
_provider
.SuppressShadowCopy(dll.Path);
107
var sc1 =
_provider
.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly);
116
var sc2 =
_provider
.GetMetadataShadowCopy(mscorlib, MetadataImageKind.Assembly);
127
var sc1 =
_provider
.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly);
131
var sc2 =
_provider
.GetMetadataShadowCopy(sc1.PrimaryModule.FullPath, MetadataImageKind.Assembly);
144
var metadata1 =
_provider
.GetMetadata(path0, MetadataImageKind.Assembly) as AssemblyMetadata;
148
var scDir = Directory.GetFileSystemEntries(
_provider
.ShadowCopyDirectory).Single();
156
Assert.True(
_provider
.IsShadowCopy(sc));
166
var metadata2 =
_provider
.GetMetadata(path0, MetadataImageKind.Assembly) as AssemblyMetadata;
173
var modifiedMetadata3 =
_provider
.GetMetadata(path0, MetadataImageKind.Assembly) as AssemblyMetadata;
187
Assert.Throws<BadImageFormatException>(() =>
_provider
.GetMetadata(f0, MetadataImageKind.Assembly));
190
Assert.Throws<FileNotFoundException>(() =>
_provider
.GetMetadata(f1, MetadataImageKind.Assembly));
200
var sc1 =
_provider
.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly);
201
var sc2 =
_provider
.GetMetadataShadowCopy(dll.Path, MetadataImageKind.Assembly);
203
var md1 =
_provider
.GetMetadata(dll.Path, MetadataImageKind.Assembly);
212
Assert.Equal(1,
_provider
.CacheSize);
213
var sc3a =
_provider
.GetMetadataShadowCopy(dll2.Path, MetadataImageKind.Module);
214
Assert.Equal(2,
_provider
.CacheSize);