File: TestDataVariations.cs

package info (click to toggle)
mono-reference-assemblies 3.12.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 604,240 kB
  • ctags: 625,505
  • sloc: cs: 3,967,741; xml: 2,793,081; ansic: 418,042; java: 60,435; sh: 14,833; makefile: 11,576; sql: 7,956; perl: 1,467; cpp: 1,446; yacc: 1,203; python: 598; asm: 422; sed: 16; php: 1
file content (97 lines) | stat: -rw-r--r-- 3,635 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.

using System;

namespace Microsoft.TestCommon
{
    /// <summary>
    /// An flags enum that can be used to indicate different variations of a given 
    /// <see cref="TestData"/> instance.
    /// </summary>
    [Flags]
    public enum TestDataVariations
    {
        /// <summary>
        /// An individual instance of a given <see cref="TestData"/> type.
        /// </summary>
        AsInstance = 0x1,

        /// <summary>
        /// An individual instance of a type that derives from a given <see cref="TestData"/> type.
        /// </summary>
        AsDerivedType = 0x2,

        /// <summary>
        /// An individual instance of a given <see cref="TestData"/> type that has a property value 
        /// that is a known type of the declared property type.
        /// </summary>
        AsKnownType = 0x4,

        /// <summary>
        /// A <see cref="Nullable<>"/> instance of a given <see cref="TestData"/> type.  Only applies to
        /// instances of <see cref="ValueTypeTestData"/>.
        /// </summary>
        AsNullable = 0x8,

        /// <summary>
        /// An instance of a <see cref="System.Collections.Generic.List<>"/> of a given <see cref="TestData"/> type.
        /// </summary>
        AsList = 0x10,

        /// <summary>
        /// An instance of a array of the <see cref="TestData"/> type.
        /// </summary>
        AsArray = 0x20,

        /// <summary>
        /// An instance of an <see cref="System.Collections.Generic.IEnumerable<>"/> of a given <see cref="TestData"/> type.
        /// </summary>
        AsIEnumerable = 0x40,

        /// <summary>
        /// An instance of an <see cref="System.Linq.IQueryable<>"/> of a given <see cref="TestData"/> type.
        /// </summary>
        AsIQueryable = 0x80,

        /// <summary>
        /// An instance of a DataContract type in which a given <see cref="TestData"/> type is a member.
        /// </summary>
        AsDataMember = 0x100,

        /// <summary>
        /// An instance of a type in which a given <see cref="TestData"/> type is decorated with a 
        /// <see cref="System.Xml.Serialization.XmlElementAttribute"/>.
        /// </summary>
        AsXmlElementProperty = 0x200,

        /// <summary>
        /// All of the flags for single instance variations of a given <see cref="TestData"/> type.
        /// </summary>
        AllSingleInstances = AsInstance | AsDerivedType | AsKnownType | AsNullable,

        /// <summary>
        /// All of the flags for collection variations of a given <see cref="TestData"/> type.
        /// </summary>
        AllCollections = AsList | AsArray | AsIEnumerable | AsIQueryable,

        /// <summary>
        /// All of the flags for variations in which a given <see cref="TestData"/> type is a property on another type.
        /// </summary>
        AllProperties = AsDataMember | AsXmlElementProperty,

        /// <summary>
        /// All of the flags for interface collection variations of a given <see cref="TestData"/> type.
        /// </summary>
        AllInterfaces = AsIEnumerable | AsIQueryable,

        /// <summary>
        /// All of the flags except for the interface collection variations of a given <see cref="TestData"/> type.
        /// </summary>
        AllNonInterfaces = All & ~AllInterfaces,

        /// <summary>
        /// All of the flags for all of the variations of a given <see cref="TestData"/> type.
        /// </summary>
        All = AllSingleInstances | AllCollections | AllProperties
    }
}