@@ -0,0 +1,195 | |||
|
1 | using System; | |
|
2 | using System.Reflection; | |
|
3 | using System.Threading; | |
|
4 | using Implab.Parallels; | |
|
5 | using Implab.Components; | |
|
6 | ||
|
7 | #if MONO | |
|
8 | ||
|
9 | using NUnit.Framework; | |
|
10 | using TestClassAttribute = NUnit.Framework.TestFixtureAttribute; | |
|
11 | using TestMethodAttribute = NUnit.Framework.TestAttribute; | |
|
12 | using AssertFailedException = NUnit.Framework.AssertionException; | |
|
13 | #else | |
|
14 | ||
|
15 | using Microsoft.VisualStudio.TestTools.UnitTesting; | |
|
16 | ||
|
17 | #endif | |
|
18 | ||
|
19 | namespace Implab.Test { | |
|
20 | [TestClass] | |
|
21 | public class RunnableComponentTests { | |
|
22 | ||
|
23 | static void ShouldThrow(Action action) { | |
|
24 | try { | |
|
25 | action(); | |
|
26 | Assert.Fail(); | |
|
27 | } catch (AssertFailedException) { | |
|
28 | throw; | |
|
29 | } catch { | |
|
30 | } | |
|
31 | } | |
|
32 | ||
|
33 | class Runnable : RunnableComponent { | |
|
34 | public Runnable(bool initialized) : base(initialized) { | |
|
35 | } | |
|
36 | ||
|
37 | public Action MockInit { | |
|
38 | get; | |
|
39 | set; | |
|
40 | } | |
|
41 | ||
|
42 | public Func<IPromise> MockStart { | |
|
43 | get; | |
|
44 | set; | |
|
45 | } | |
|
46 | ||
|
47 | public Func<IPromise> MockStop { | |
|
48 | get; | |
|
49 | set; | |
|
50 | } | |
|
51 | ||
|
52 | protected override IPromise OnStart() { | |
|
53 | return MockStart != null ? MockStart() : base.OnStart(); | |
|
54 | } | |
|
55 | ||
|
56 | protected override IPromise OnStop() { | |
|
57 | return MockStop != null ? MockStop() : base.OnStart(); | |
|
58 | } | |
|
59 | ||
|
60 | protected override void OnInitialize() { | |
|
61 | if (MockInit != null) | |
|
62 | MockInit(); | |
|
63 | } | |
|
64 | } | |
|
65 | ||
|
66 | [TestMethod] | |
|
67 | public void NormalFlowTest() { | |
|
68 | var comp = new Runnable(false); | |
|
69 | ||
|
70 | Assert.AreEqual(ExecutionState.Created, comp.State); | |
|
71 | ||
|
72 | comp.Init(); | |
|
73 | ||
|
74 | Assert.AreEqual(ExecutionState.Ready, comp.State); | |
|
75 | ||
|
76 | comp.Start().Join(1000); | |
|
77 | ||
|
78 | Assert.AreEqual(ExecutionState.Running, comp.State); | |
|
79 | ||
|
80 | comp.Stop().Join(1000); | |
|
81 | ||
|
82 | Assert.AreEqual(ExecutionState.Disposed, comp.State); | |
|
83 | ||
|
84 | } | |
|
85 | ||
|
86 | [TestMethod] | |
|
87 | public void InitFailTest() { | |
|
88 | var comp = new Runnable(false) { | |
|
89 | MockInit = () => { | |
|
90 | throw new Exception("BAD"); | |
|
91 | } | |
|
92 | }; | |
|
93 | ||
|
94 | ShouldThrow(() => comp.Start()); | |
|
95 | ShouldThrow(() => comp.Stop()); | |
|
96 | Assert.AreEqual(ExecutionState.Created, comp.State); | |
|
97 | ||
|
98 | ShouldThrow(comp.Init); | |
|
99 | ||
|
100 | Assert.AreEqual(ExecutionState.Failed, comp.State); | |
|
101 | ||
|
102 | ShouldThrow(() => comp.Start()); | |
|
103 | ShouldThrow(() => comp.Stop()); | |
|
104 | Assert.AreEqual(ExecutionState.Failed, comp.State); | |
|
105 | ||
|
106 | comp.Dispose(); | |
|
107 | Assert.AreEqual(ExecutionState.Disposed, comp.State); | |
|
108 | } | |
|
109 | ||
|
110 | [TestMethod] | |
|
111 | public void DisposedTest() { | |
|
112 | ||
|
113 | var comp = new Runnable(false); | |
|
114 | comp.Dispose(); | |
|
115 | ||
|
116 | ShouldThrow(() => comp.Start()); | |
|
117 | ShouldThrow(() => comp.Stop()); | |
|
118 | ShouldThrow(comp.Init); | |
|
119 | ||
|
120 | Assert.AreEqual(ExecutionState.Disposed, comp.State); | |
|
121 | } | |
|
122 | ||
|
123 | [TestMethod] | |
|
124 | public void StartCancelTest() { | |
|
125 | var comp = new Runnable(true) { | |
|
126 | MockStart = () => PromiseHelper.Sleep(100000, 0) | |
|
127 | }; | |
|
128 | ||
|
129 | var p = comp.Start(); | |
|
130 | Assert.AreEqual(ExecutionState.Starting, comp.State); | |
|
131 | p.Cancel(); | |
|
132 | ShouldThrow(() => p.Join(1000)); | |
|
133 | Assert.AreEqual(ExecutionState.Failed, comp.State); | |
|
134 | ||
|
135 | Assert.IsInstanceOfType(comp.LastError, typeof(OperationCanceledException)); | |
|
136 | ||
|
137 | comp.Dispose(); | |
|
138 | } | |
|
139 | ||
|
140 | [TestMethod] | |
|
141 | public void StartStopTest() { | |
|
142 | var stop = new Signal(); | |
|
143 | var comp = new Runnable(true) { | |
|
144 | MockStart = () => PromiseHelper.Sleep(100000, 0), | |
|
145 | MockStop = () => AsyncPool.RunThread(stop.Wait) | |
|
146 | }; | |
|
147 | ||
|
148 | var p1 = comp.Start(); | |
|
149 | var p2 = comp.Stop(); | |
|
150 | // should enter stopping state | |
|
151 | ||
|
152 | ShouldThrow(p1.Join); | |
|
153 | Assert.IsTrue(p1.IsCancelled); | |
|
154 | Assert.AreEqual(ExecutionState.Stopping, comp.State); | |
|
155 | ||
|
156 | stop.Set(); | |
|
157 | p2.Join(1000); | |
|
158 | Assert.AreEqual(ExecutionState.Disposed, comp.State); | |
|
159 | } | |
|
160 | ||
|
161 | [TestMethod] | |
|
162 | public void StartStopFailTest() { | |
|
163 | var comp = new Runnable(true) { | |
|
164 | MockStart = () => PromiseHelper.Sleep(100000, 0).Then(null,null,x => { throw new Exception("I'm dead"); }) | |
|
165 | }; | |
|
166 | ||
|
167 | comp.Start(); | |
|
168 | var p = comp.Stop(); | |
|
169 | // if Start fails to cancel, should fail to stop | |
|
170 | ShouldThrow(() => p.Join(1000)); | |
|
171 | Assert.AreEqual(ExecutionState.Failed, comp.State); | |
|
172 | Assert.IsNotNull(comp.LastError); | |
|
173 | Assert.AreEqual("I'm dead", comp.LastError.Message); | |
|
174 | } | |
|
175 | ||
|
176 | [TestMethod] | |
|
177 | public void StopCancelTest() { | |
|
178 | var comp = new Runnable(true) { | |
|
179 | MockStop = () => PromiseHelper.Sleep(100000, 0) | |
|
180 | }; | |
|
181 | ||
|
182 | comp.Start(); | |
|
183 | var p = comp.Stop(); | |
|
184 | Assert.AreEqual(ExecutionState.Stopping, comp.State); | |
|
185 | p.Cancel(); | |
|
186 | ShouldThrow(() => p.Join(1000)); | |
|
187 | Assert.AreEqual(ExecutionState.Failed, comp.State); | |
|
188 | Assert.IsInstanceOfType(comp.LastError, typeof(OperationCanceledException)); | |
|
189 | ||
|
190 | comp.Dispose(); | |
|
191 | } | |
|
192 | ||
|
193 | } | |
|
194 | } | |
|
195 |
@@ -0,0 +1,45 | |||
|
1 | using System; | |
|
2 | using System.Threading; | |
|
3 | ||
|
4 | namespace Implab { | |
|
5 | /// <summary> | |
|
6 | /// Базовый класс для реализации задачь. Задача представляет собой некторое | |
|
7 | /// действие, которое можно иницировать и обработать результат его выполнения | |
|
8 | /// в виде обещания, для этого оно реализует интерфейс <see cref="IPromise"/>. | |
|
9 | /// </summary> | |
|
10 | /// <remarks> | |
|
11 | /// Данный класс определяет стандартное поведение при обработки результатов, в частности | |
|
12 | /// обработку <see cref="System.OperationCanceledException"/> и <see cref="PromiseTransientException"/> | |
|
13 | /// </remarks> | |
|
14 | public abstract class AbstractTask : AbstractPromise { | |
|
15 | int m_cancelationLock; | |
|
16 | ||
|
17 | /// <summary> | |
|
18 | /// Получает эксклюзивное право отмены задания, используется для отмены задания до начала его выполнения. | |
|
19 | /// </summary> | |
|
20 | /// <returns><c>true</c>, if cancelation was locked, <c>false</c> otherwise.</returns> | |
|
21 | protected bool LockCancelation() { | |
|
22 | return 0 == Interlocked.CompareExchange(ref m_cancelationLock, 1, 0); | |
|
23 | } | |
|
24 | ||
|
25 | ||
|
26 | ||
|
27 | protected void SetErrorInternal(Exception error) { | |
|
28 | // unwrap | |
|
29 | while (error is PromiseTransientException && error.InnerException != null) | |
|
30 | error = error.InnerException; | |
|
31 | ||
|
32 | if (error is OperationCanceledException) | |
|
33 | SetCancelled(error); | |
|
34 | else | |
|
35 | SetError(error); | |
|
36 | } | |
|
37 | ||
|
38 | protected void SetCancelledInternal(Exception reason) { | |
|
39 | SetCancelled( | |
|
40 | reason == null ? new OperationCanceledException() : reason is OperationCanceledException ? reason : new OperationCanceledException(null, reason) | |
|
41 | ); | |
|
42 | } | |
|
43 | } | |
|
44 | } | |
|
45 |
@@ -0,0 +1,36 | |||
|
1 | using System; | |
|
2 | using System.Threading; | |
|
3 | ||
|
4 | namespace Implab { | |
|
5 | public abstract class AbstractTask<T> : AbstractPromise<T> { | |
|
6 | int m_cancelationLock; | |
|
7 | ||
|
8 | /// <summary> | |
|
9 | /// Получает эксклюзивное право отмены задания, используется для отмены задания до начала его выполнения. | |
|
10 | /// </summary> | |
|
11 | /// <returns><c>true</c>, if cancelation was locked, <c>false</c> otherwise.</returns> | |
|
12 | protected bool LockCancelation() { | |
|
13 | return 0 == Interlocked.CompareExchange(ref m_cancelationLock, 1, 0); | |
|
14 | } | |
|
15 | ||
|
16 | ||
|
17 | ||
|
18 | protected void SetErrorInternal(Exception error) { | |
|
19 | // unwrap | |
|
20 | while (error is PromiseTransientException && error.InnerException != null) | |
|
21 | error = error.InnerException; | |
|
22 | ||
|
23 | if (error is OperationCanceledException) | |
|
24 | SetCancelled(error); | |
|
25 | else | |
|
26 | SetError(error); | |
|
27 | } | |
|
28 | ||
|
29 | protected void SetCancelledInternal(Exception reason) { | |
|
30 | SetCancelled( | |
|
31 | reason == null ? new OperationCanceledException() : reason is OperationCanceledException ? reason : new OperationCanceledException(null, reason) | |
|
32 | ); | |
|
33 | } | |
|
34 | } | |
|
35 | } | |
|
36 |
@@ -0,0 +1,9 | |||
|
1 | ||
|
2 | namespace Implab.Automaton { | |
|
3 | public static class AutomatonConst { | |
|
4 | public const int UNREACHABLE_STATE = -1; | |
|
5 | ||
|
6 | public const int UNCLASSIFIED_INPUT = 0; | |
|
7 | } | |
|
8 | } | |
|
9 |
@@ -0,0 +1,33 | |||
|
1 | using System; | |
|
2 | ||
|
3 | namespace Implab.Automaton { | |
|
4 | public struct AutomatonTransition : IEquatable<AutomatonTransition> { | |
|
5 | public readonly int s1; | |
|
6 | public readonly int s2; | |
|
7 | public readonly int edge; | |
|
8 | ||
|
9 | public AutomatonTransition(int s1, int s2, int edge) { | |
|
10 | this.s1 = s1; | |
|
11 | this.s2 = s2; | |
|
12 | this.edge = edge; | |
|
13 | } | |
|
14 | ||
|
15 | ||
|
16 | #region IEquatable implementation | |
|
17 | public bool Equals(AutomatonTransition other) { | |
|
18 | return other.s1 == s1 && other.s2 == s2 && other.edge == edge ; | |
|
19 | } | |
|
20 | #endregion | |
|
21 | ||
|
22 | public override bool Equals(object obj) { | |
|
23 | if (obj is AutomatonTransition) | |
|
24 | return Equals((AutomatonTransition)obj); | |
|
25 | return base.Equals(obj); | |
|
26 | } | |
|
27 | ||
|
28 | public override int GetHashCode() { | |
|
29 | return s1 + s2 + edge; | |
|
30 | } | |
|
31 | } | |
|
32 | } | |
|
33 |
@@ -0,0 +1,348 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using System.Diagnostics; | |
|
6 | using System.IO; | |
|
7 | using System.CodeDom.Compiler; | |
|
8 | using System.CodeDom; | |
|
9 | ||
|
10 | namespace Implab.Automaton { | |
|
11 | public class DFATable : IDFATableBuilder { | |
|
12 | int m_stateCount; | |
|
13 | int m_symbolCount; | |
|
14 | int m_initialState; | |
|
15 | ||
|
16 | readonly HashSet<int> m_finalStates = new HashSet<int>(); | |
|
17 | readonly HashSet<AutomatonTransition> m_transitions = new HashSet<AutomatonTransition>(); | |
|
18 | ||
|
19 | ||
|
20 | #region IDFADefinition implementation | |
|
21 | ||
|
22 | public bool IsFinalState(int s) { | |
|
23 | Safe.ArgumentInRange(s, 0, m_stateCount, "s"); | |
|
24 | ||
|
25 | return m_finalStates.Contains(s); | |
|
26 | } | |
|
27 | ||
|
28 | public IEnumerable<int> FinalStates { | |
|
29 | get { | |
|
30 | return m_finalStates; | |
|
31 | } | |
|
32 | } | |
|
33 | ||
|
34 | public int StateCount { | |
|
35 | get { return m_stateCount; } | |
|
36 | } | |
|
37 | ||
|
38 | public int AlphabetSize { | |
|
39 | get { return m_symbolCount; } | |
|
40 | } | |
|
41 | ||
|
42 | public int InitialState { | |
|
43 | get { return m_initialState; } | |
|
44 | } | |
|
45 | ||
|
46 | #endregion | |
|
47 | ||
|
48 | public void SetInitialState(int s) { | |
|
49 | Safe.ArgumentAssert(s >= 0, "s"); | |
|
50 | m_stateCount = Math.Max(m_stateCount, s + 1); | |
|
51 | m_initialState = s; | |
|
52 | } | |
|
53 | ||
|
54 | public void MarkFinalState(int state) { | |
|
55 | m_stateCount = Math.Max(m_stateCount, state + 1); | |
|
56 | m_finalStates.Add(state); | |
|
57 | } | |
|
58 | ||
|
59 | public void Add(AutomatonTransition item) { | |
|
60 | Safe.ArgumentAssert(item.s1 >= 0, "item"); | |
|
61 | Safe.ArgumentAssert(item.s2 >= 0, "item"); | |
|
62 | Safe.ArgumentAssert(item.edge >= 0, "item"); | |
|
63 | ||
|
64 | m_stateCount = Math.Max(m_stateCount, Math.Max(item.s1, item.s2) + 1); | |
|
65 | m_symbolCount = Math.Max(m_symbolCount, item.edge + 1); | |
|
66 | ||
|
67 | m_transitions.Add(item); | |
|
68 | } | |
|
69 | ||
|
70 | public void Clear() { | |
|
71 | m_stateCount = 0; | |
|
72 | m_symbolCount = 0; | |
|
73 | m_finalStates.Clear(); | |
|
74 | m_transitions.Clear(); | |
|
75 | } | |
|
76 | ||
|
77 | public bool Contains(AutomatonTransition item) { | |
|
78 | return m_transitions.Contains(item); | |
|
79 | } | |
|
80 | ||
|
81 | public void CopyTo(AutomatonTransition[] array, int arrayIndex) { | |
|
82 | m_transitions.CopyTo(array, arrayIndex); | |
|
83 | } | |
|
84 | ||
|
85 | public bool Remove(AutomatonTransition item) { | |
|
86 | return m_transitions.Remove(item); | |
|
87 | } | |
|
88 | ||
|
89 | public int Count { | |
|
90 | get { | |
|
91 | return m_transitions.Count; | |
|
92 | } | |
|
93 | } | |
|
94 | ||
|
95 | public bool IsReadOnly { | |
|
96 | get { | |
|
97 | return false; | |
|
98 | } | |
|
99 | } | |
|
100 | ||
|
101 | public IEnumerator<AutomatonTransition> GetEnumerator() { | |
|
102 | return m_transitions.GetEnumerator(); | |
|
103 | } | |
|
104 | ||
|
105 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { | |
|
106 | return GetEnumerator(); | |
|
107 | } | |
|
108 | ||
|
109 | public void AddSymbol(int symbol) { | |
|
110 | Safe.ArgumentAssert(symbol >= 0, "symbol"); | |
|
111 | m_symbolCount = Math.Max(symbol + 1, m_symbolCount); | |
|
112 | } | |
|
113 | ||
|
114 | public int[,] CreateTransitionTable() { | |
|
115 | var table = new int[StateCount,AlphabetSize]; | |
|
116 | ||
|
117 | for (int i = 0; i < StateCount; i++) | |
|
118 | for (int j = 0; j < AlphabetSize; j++) | |
|
119 | table[i, j] = AutomatonConst.UNREACHABLE_STATE; | |
|
120 | ||
|
121 | foreach (var t in this) | |
|
122 | table[t.s1,t.edge] = t.s2; | |
|
123 | ||
|
124 | return table; | |
|
125 | } | |
|
126 | ||
|
127 | public bool[] CreateFinalStateTable() { | |
|
128 | var table = new bool[StateCount]; | |
|
129 | ||
|
130 | foreach (var s in FinalStates) | |
|
131 | table[s] = true; | |
|
132 | ||
|
133 | return table; | |
|
134 | } | |
|
135 | ||
|
136 | /// <summary>Формирует множества конечных состояний перед началом работы алгоритма минимизации.</summary> | |
|
137 | /// <remarks> | |
|
138 | /// В процессе построения минимального автомата требуется разделить множество состояний, | |
|
139 | /// на два подмножества - конечные состояния и все остальные, после чего эти подмножества | |
|
140 | /// будут резделены на более мелкие. Иногда требуется гарантировать различия конечных сосотяний, | |
|
141 | /// для этого необходимо переопределить даннцю фукнцию, для получения множеств конечных состояний. | |
|
142 | /// </remarks> | |
|
143 | /// <returns>The final states.</returns> | |
|
144 | protected virtual IEnumerable<HashSet<int>> SplitFinalStates(IEnumerable<int> states) { | |
|
145 | return new [] { new HashSet<int>(states) }; | |
|
146 | } | |
|
147 | ||
|
148 | protected void Optimize( | |
|
149 | IDFATableBuilder optimalDFA, | |
|
150 | IDictionary<int,int> alphabetMap, | |
|
151 | IDictionary<int,int> stateMap | |
|
152 | ) { | |
|
153 | Safe.ArgumentNotNull(optimalDFA, "dfa"); | |
|
154 | Safe.ArgumentNotNull(alphabetMap, "alphabetMap"); | |
|
155 | Safe.ArgumentNotNull(stateMap, "stateMap"); | |
|
156 | ||
|
157 | ||
|
158 | var setComparer = new CustomEqualityComparer<HashSet<int>>( | |
|
159 | (x, y) => x.SetEquals(y), | |
|
160 | s => s.Sum(x => x.GetHashCode()) | |
|
161 | ); | |
|
162 | ||
|
163 | var optimalStates = new HashSet<HashSet<int>>(setComparer); | |
|
164 | var queue = new HashSet<HashSet<int>>(setComparer); | |
|
165 | ||
|
166 | optimalStates.Add(new HashSet<int>(FinalStates)); | |
|
167 | ||
|
168 | var state = new HashSet<int>( | |
|
169 | Enumerable | |
|
170 | .Range(0, m_stateCount) | |
|
171 | .Where(i => !m_finalStates.Contains(i)) | |
|
172 | ); | |
|
173 | ||
|
174 | optimalStates.Add(state); | |
|
175 | queue.Add(state); | |
|
176 | ||
|
177 | var rmap = m_transitions | |
|
178 | .GroupBy(t => t.s2) | |
|
179 | .ToDictionary( | |
|
180 | g => g.Key, // s2 | |
|
181 | g => g.ToLookup(t => t.edge, t => t.s1)//.ToDictionary(p => p.Key) | |
|
182 | ); | |
|
183 | ||
|
184 | while (queue.Count > 0) { | |
|
185 | var stateA = queue.First(); | |
|
186 | queue.Remove(stateA); | |
|
187 | ||
|
188 | for (int c = 0; c < m_symbolCount; c++) { | |
|
189 | var stateX = new HashSet<int>(); | |
|
190 | foreach(var a in stateA.Where(rmap.ContainsKey)) | |
|
191 | stateX.UnionWith(rmap[a][c]); // all states from wich the symbol 'c' leads to the state 'a' | |
|
192 | ||
|
193 | var tmp = optimalStates.ToArray(); | |
|
194 | foreach (var stateY in tmp) { | |
|
195 | var stateR1 = new HashSet<int>(stateY); | |
|
196 | var stateR2 = new HashSet<int>(stateY); | |
|
197 | ||
|
198 | stateR1.IntersectWith(stateX); | |
|
199 | stateR2.ExceptWith(stateX); | |
|
200 | ||
|
201 | if (stateR1.Count > 0 && stateR2.Count > 0) { | |
|
202 | ||
|
203 | ||
|
204 | optimalStates.Remove(stateY); | |
|
205 | optimalStates.Add(stateR1); | |
|
206 | optimalStates.Add(stateR2); | |
|
207 | ||
|
208 | if (queue.Contains(stateY)) { | |
|
209 | queue.Remove(stateY); | |
|
210 | queue.Add(stateR1); | |
|
211 | queue.Add(stateR2); | |
|
212 | } else { | |
|
213 | queue.Add(stateR1.Count <= stateR2.Count ? stateR1 : stateR2); | |
|
214 | } | |
|
215 | } | |
|
216 | } | |
|
217 | } | |
|
218 | } | |
|
219 | ||
|
220 | // дополнительно разбиваем конечные состояния | |
|
221 | foreach (var final in optimalStates.Where(s => s.Overlaps(m_finalStates)).ToArray()) { | |
|
222 | optimalStates.Remove(final); | |
|
223 | foreach (var split in SplitFinalStates(final)) | |
|
224 | optimalStates.Add(split); | |
|
225 | } | |
|
226 | ||
|
227 | ||
|
228 | // карта получения оптимального состояния по соотвествующему ему простому состоянию | |
|
229 | var nextState = 0; | |
|
230 | foreach (var item in optimalStates) { | |
|
231 | var id = nextState++; | |
|
232 | foreach (var s in item) | |
|
233 | stateMap[s] = id; | |
|
234 | } | |
|
235 | ||
|
236 | // получаем минимальный алфавит | |
|
237 | // входные символы не различимы, если Move(s,a1) == Move(s,a2), для любого s | |
|
238 | // для этого используем алгоритм кластеризации, сначала | |
|
239 | // считаем, что все символы не различимы | |
|
240 | ||
|
241 | var minClasses = new HashSet<HashSet<int>>(setComparer); | |
|
242 | var alphaQueue = new Queue<HashSet<int>>(); | |
|
243 | alphaQueue.Enqueue(new HashSet<int>(Enumerable.Range(0,AlphabetSize))); | |
|
244 | ||
|
245 | // для всех состояний, будем проверять каждый класс на различимость, | |
|
246 | // т.е. символы различимы, если они приводят к разным состояниям | |
|
247 | for (int s = 0 ; s < optimalStates.Count; s++) { | |
|
248 | var newQueue = new Queue<HashSet<int>>(); | |
|
249 | ||
|
250 | foreach (var A in alphaQueue) { | |
|
251 | // классы из одного символа делить бесполезно, переводим их сразу в | |
|
252 | // результирующий алфавит | |
|
253 | if (A.Count == 1) { | |
|
254 | minClasses.Add(A); | |
|
255 | continue; | |
|
256 | } | |
|
257 | ||
|
258 | // различаем классы символов, которые переводят в различные оптимальные состояния | |
|
259 | // optimalState -> alphaClass | |
|
260 | var classes = new Dictionary<int, HashSet<int>>(); | |
|
261 | ||
|
262 | foreach (var term in A) { | |
|
263 | // ищем все переходы класса по символу term | |
|
264 | var s2 = m_transitions.Where(t => stateMap[t.s1] == s && t.edge == term).Select(t => stateMap[t.s2]).DefaultIfEmpty(-1).First(); | |
|
265 | ||
|
266 | HashSet<int> a2; | |
|
267 | if (!classes.TryGetValue(s2, out a2)) { | |
|
268 | a2 = new HashSet<int>(); | |
|
269 | newQueue.Enqueue(a2); | |
|
270 | classes[s2] = a2; | |
|
271 | } | |
|
272 | a2.Add(term); | |
|
273 | } | |
|
274 | } | |
|
275 | ||
|
276 | if (newQueue.Count == 0) | |
|
277 | break; | |
|
278 | alphaQueue = newQueue; | |
|
279 | } | |
|
280 | ||
|
281 | // после окончания работы алгоритма в очереди останутся минимальные различимые классы | |
|
282 | // входных символов | |
|
283 | foreach (var A in alphaQueue) | |
|
284 | minClasses.Add(A); | |
|
285 | ||
|
286 | // построение отображения алфавитов входных символов. | |
|
287 | // поскольку символ DFAConst.UNCLASSIFIED_INPUT может иметь | |
|
288 | // специальное значение, тогда сохраним минимальный класс, | |
|
289 | // содержащий этот символ на томже месте. | |
|
290 | ||
|
291 | var nextCls = 0; | |
|
292 | foreach (var item in minClasses) { | |
|
293 | if (nextCls == AutomatonConst.UNCLASSIFIED_INPUT) | |
|
294 | nextCls++; | |
|
295 | ||
|
296 | // сохраняем DFAConst.UNCLASSIFIED_INPUT | |
|
297 | var cls = item.Contains(AutomatonConst.UNCLASSIFIED_INPUT) ? AutomatonConst.UNCLASSIFIED_INPUT : nextCls++; | |
|
298 | optimalDFA.AddSymbol(cls); | |
|
299 | ||
|
300 | foreach (var a in item) | |
|
301 | alphabetMap[a] = cls; | |
|
302 | } | |
|
303 | ||
|
304 | // построение автомата | |
|
305 | optimalDFA.SetInitialState(stateMap[m_initialState]); | |
|
306 | ||
|
307 | foreach (var sf in m_finalStates.Select(s => stateMap[s]).Distinct()) | |
|
308 | optimalDFA.MarkFinalState(sf); | |
|
309 | ||
|
310 | foreach (var t in m_transitions.Select(t => new AutomatonTransition(stateMap[t.s1],stateMap[t.s2],alphabetMap[t.edge])).Distinct()) | |
|
311 | optimalDFA.Add(t); | |
|
312 | } | |
|
313 | ||
|
314 | protected string PrintDFA<TInput, TState>(IAlphabet<TInput> inputAlphabet, IAlphabet<TState> stateAlphabet) { | |
|
315 | Safe.ArgumentNotNull(inputAlphabet, "inputAlphabet"); | |
|
316 | Safe.ArgumentNotNull(stateAlphabet, "stateAlphabet"); | |
|
317 | ||
|
318 | var data = new List<string>(); | |
|
319 | ||
|
320 | data.Add("digraph dfa {"); | |
|
321 | ||
|
322 | foreach (var final in m_finalStates) | |
|
323 | data.Add(String.Format("{0} [shape=box];",String.Join("", stateAlphabet.GetSymbols(final)))); | |
|
324 | ||
|
325 | foreach (var t in m_transitions) | |
|
326 | data.Add(String.Format( | |
|
327 | "{0} -> {2} [label={1}];", | |
|
328 | String.Join("", stateAlphabet.GetSymbols(t.s1)), | |
|
329 | ToLiteral(ToLiteral(String.Join("", t.edge == AutomatonConst.UNCLASSIFIED_INPUT ? new [] { "@" } : inputAlphabet.GetSymbols(t.edge).Select(x => x.ToString())))), | |
|
330 | String.Join("", stateAlphabet.GetSymbols(t.s2)) | |
|
331 | )); | |
|
332 | data.Add("}"); | |
|
333 | return String.Join("\n", data); | |
|
334 | } | |
|
335 | ||
|
336 | static string ToLiteral(string input) | |
|
337 | { | |
|
338 | using (var writer = new StringWriter()) | |
|
339 | { | |
|
340 | using (var provider = CodeDomProvider.CreateProvider("CSharp")) | |
|
341 | { | |
|
342 | provider.GenerateCodeFromExpression(new CodePrimitiveExpression(input), writer, null); | |
|
343 | return writer.ToString(); | |
|
344 | } | |
|
345 | } | |
|
346 | } | |
|
347 | } | |
|
348 | } |
@@ -0,0 +1,66 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Diagnostics; | |
|
4 | using System.Globalization; | |
|
5 | using System.Linq; | |
|
6 | using System.Diagnostics.CodeAnalysis; | |
|
7 | ||
|
8 | namespace Implab.Automaton { | |
|
9 | /// <summary> | |
|
10 | /// Алфавит символами которого являются элементы перечислений. | |
|
11 | /// </summary> | |
|
12 | /// <typeparam name="T">Тип перечислений</typeparam> | |
|
13 | public class EnumAlphabet<T> : IndexedAlphabetBase<T> where T : struct, IConvertible { | |
|
14 | [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")] | |
|
15 | static readonly Lazy<T[]> _symbols = new Lazy<T[]>(GetSymbols); | |
|
16 | ||
|
17 | [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")] | |
|
18 | static readonly Lazy<EnumAlphabet<T>> _fullAlphabet = new Lazy<EnumAlphabet<T>>(CreateEnumAlphabet); | |
|
19 | ||
|
20 | static EnumAlphabet<T> CreateEnumAlphabet() { | |
|
21 | var symbols = _symbols.Value; | |
|
22 | ||
|
23 | if ( | |
|
24 | symbols[symbols.Length - 1].ToInt32(CultureInfo.InvariantCulture) >= symbols.Length | |
|
25 | || symbols[0].ToInt32(CultureInfo.InvariantCulture) != 0 | |
|
26 | ) | |
|
27 | throw new InvalidOperationException("The specified enumeration must be zero-based and continuously numbered"); | |
|
28 | ||
|
29 | return new EnumAlphabet<T>(symbols.Select(x => x.ToInt32(CultureInfo.InvariantCulture)).ToArray()); | |
|
30 | } | |
|
31 | ||
|
32 | static T[] GetSymbols() { | |
|
33 | if (!typeof(T).IsEnum) | |
|
34 | throw new InvalidOperationException("Invalid generic parameter, enumeration is required"); | |
|
35 | ||
|
36 | if (Enum.GetUnderlyingType(typeof(T)) != typeof(Int32)) | |
|
37 | throw new InvalidOperationException("Only enums based on Int32 are supported"); | |
|
38 | ||
|
39 | return ((T[])Enum.GetValues(typeof(T))) | |
|
40 | .OrderBy(x => x.ToInt32(CultureInfo.InvariantCulture)) | |
|
41 | .ToArray(); | |
|
42 | } | |
|
43 | ||
|
44 | public static EnumAlphabet<T> FullAlphabet { | |
|
45 | get { | |
|
46 | return _fullAlphabet.Value; | |
|
47 | } | |
|
48 | } | |
|
49 | ||
|
50 | ||
|
51 | public EnumAlphabet() | |
|
52 | : base(_symbols.Value.Length) { | |
|
53 | } | |
|
54 | ||
|
55 | public EnumAlphabet(int[] map) | |
|
56 | : base(map) { | |
|
57 | Debug.Assert(map.Length == _symbols.Value.Length); | |
|
58 | } | |
|
59 | ||
|
60 | ||
|
61 | public override int GetSymbolIndex(T symbol) { | |
|
62 | return symbol.ToInt32(CultureInfo.InvariantCulture); | |
|
63 | } | |
|
64 | ||
|
65 | } | |
|
66 | } |
@@ -0,0 +1,34 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Threading.Tasks; | |
|
6 | ||
|
7 | namespace Implab.Automaton { | |
|
8 | /// <summary> | |
|
9 | /// Алфавит. Множество символов, которые разбиты на классы, при этом классы имеют непрерывную нумерацию, | |
|
10 | /// что позволяет использовать их в качестве индексов массивов. | |
|
11 | /// </summary> | |
|
12 | /// <remarks> | |
|
13 | /// <para>Алфавит является сюрьективным отображением множества символов в множество индексов, это позволяет сократить размер таблицы переходов автомата | |
|
14 | /// для входных символов, которые для него не различимы.</para> | |
|
15 | /// </remarks> | |
|
16 | /// <typeparam name="TSymbol">Тип символов.</typeparam> | |
|
17 | public interface IAlphabet<TSymbol> { | |
|
18 | /// <summary> | |
|
19 | /// Количество классов символов в алфавите. | |
|
20 | /// </summary> | |
|
21 | int Count { get; } | |
|
22 | ||
|
23 | /// <summary> | |
|
24 | /// Преобразует входной символ в индекс символа из алфавита. | |
|
25 | /// </summary> | |
|
26 | /// <param name="symobl">Исходный символ</param> | |
|
27 | /// <returns>Индекс в алфавите</returns> | |
|
28 | int Translate(TSymbol symobl); | |
|
29 | ||
|
30 | bool Contains(TSymbol symbol); | |
|
31 | ||
|
32 | IEnumerable<TSymbol> GetSymbols(int cls); | |
|
33 | } | |
|
34 | } |
@@ -0,0 +1,26 | |||
|
1 | ||
|
2 | using System.Collections.Generic; | |
|
3 | ||
|
4 | namespace Implab.Automaton { | |
|
5 | public interface IAlphabetBuilder<TSymbol> : IAlphabet<TSymbol> { | |
|
6 | /// <summary> | |
|
7 | /// Добавляет новый символ в алфавит, если символ уже был добавлен, то | |
|
8 | /// возвращается ранее сопоставленный с символом класс. | |
|
9 | /// </summary> | |
|
10 | /// <param name="symbol">Символ для добавления.</param> | |
|
11 | /// <returns>Индекс класса, который попоставлен с символом.</returns> | |
|
12 | int DefineSymbol(TSymbol symbol); | |
|
13 | ||
|
14 | int DefineSymbol(TSymbol symbol, int cls); | |
|
15 | /// <summary> | |
|
16 | /// Доабвляем класс символов. Множеству указанных исходных символов | |
|
17 | /// будет сопоставлен символ в алфавите. | |
|
18 | /// </summary> | |
|
19 | /// <param name="symbols">Множестов исходных символов</param> | |
|
20 | /// <returns>Идентификатор символа алфавита.</returns> | |
|
21 | int DefineClass(IEnumerable<TSymbol> symbols); | |
|
22 | ||
|
23 | int DefineClass(IEnumerable<TSymbol> symbols, int cls); | |
|
24 | } | |
|
25 | } | |
|
26 |
@@ -0,0 +1,53 | |||
|
1 | using System.Collections.Generic; | |
|
2 | ||
|
3 | ||
|
4 | namespace Implab.Automaton { | |
|
5 | /// <summary> | |
|
6 | /// Полностью описывает DFA автомат, его поведение, состояние и входные символы. | |
|
7 | /// </summary> | |
|
8 | /// <example> | |
|
9 | /// class MyAutomaton { | |
|
10 | /// int m_current; | |
|
11 | /// readonly DFAStateDescriptor<string>[] m_automaton; | |
|
12 | /// readonly IAlphabet<MyCommands> m_commands; | |
|
13 | /// | |
|
14 | /// public MyAutomaton(IDFADefinition<MyCommands,MyStates,string> definition) { | |
|
15 | /// m_current = definition.StateAlphabet.Translate(MyStates.Initial); | |
|
16 | /// m_automaton = definition.GetTransitionTable(); | |
|
17 | /// m_commands = definition.InputAlphabet; | |
|
18 | /// } | |
|
19 | /// | |
|
20 | /// // defined a method which will move the automaton to the next state | |
|
21 | /// public void Move(MyCommands cmd) { | |
|
22 | /// // use transition map to determine the next state | |
|
23 | /// var next = m_automaton[m_current].transitions[m_commands.Translate(cmd)]; | |
|
24 | /// | |
|
25 | /// // validate that we aren't in the unreachable state | |
|
26 | /// if (next == DFAConst.UNREACHABLE_STATE) | |
|
27 | /// throw new InvalidOperationException("The specified command is invalid"); | |
|
28 | /// | |
|
29 | /// // if everything is ok | |
|
30 | /// m_current = next; | |
|
31 | /// } | |
|
32 | /// } | |
|
33 | /// </example> | |
|
34 | public interface IDFATable : IEnumerable<AutomatonTransition> { | |
|
35 | int StateCount { | |
|
36 | get; | |
|
37 | } | |
|
38 | ||
|
39 | int AlphabetSize { | |
|
40 | get; | |
|
41 | } | |
|
42 | ||
|
43 | int InitialState { | |
|
44 | get; | |
|
45 | } | |
|
46 | ||
|
47 | bool IsFinalState(int s); | |
|
48 | ||
|
49 | IEnumerable<int> FinalStates { | |
|
50 | get; | |
|
51 | } | |
|
52 | } | |
|
53 | } |
@@ -0,0 +1,26 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | ||
|
4 | namespace Implab.Automaton { | |
|
5 | public interface IDFATableBuilder : IDFATable, ICollection<AutomatonTransition> { | |
|
6 | /// <summary> | |
|
7 | /// Marks the state as final. | |
|
8 | /// </summary> | |
|
9 | /// <param name="state">State.</param> | |
|
10 | void MarkFinalState(int state); | |
|
11 | ||
|
12 | void SetInitialState(int s); | |
|
13 | ||
|
14 | /// <summary> | |
|
15 | /// Increases if needed the input alphabet size to hold the specified symbol. | |
|
16 | /// </summary> | |
|
17 | /// <remarks> | |
|
18 | /// <code> | |
|
19 | /// AlphabetSize = Math.Max(AlphabetSize, symbol + 1) | |
|
20 | /// </code> | |
|
21 | /// </remarks> | |
|
22 | /// <param name="symbol">Symbol.</param> | |
|
23 | void AddSymbol(int symbol); | |
|
24 | } | |
|
25 | } | |
|
26 |
@@ -0,0 +1,50 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Diagnostics; | |
|
5 | using System.Linq; | |
|
6 | ||
|
7 | namespace Implab.Automaton { | |
|
8 | /// <summary> | |
|
9 | /// Indexed alphabet is the finite set of symbols where each symbol has a zero-based unique index. | |
|
10 | /// </summary> | |
|
11 | /// <remarks> | |
|
12 | /// Indexed alphabets are usefull in bulting efficient translations from source alphabet | |
|
13 | /// to the input alphabet of the automaton. It's assumed that the index to the symbol match | |
|
14 | /// is well known and documented. | |
|
15 | /// </remarks> | |
|
16 | public abstract class IndexedAlphabetBase<T> : MapAlphabet<T> { | |
|
17 | ||
|
18 | protected IndexedAlphabetBase() :base(true, null) { | |
|
19 | } | |
|
20 | ||
|
21 | public abstract int GetSymbolIndex(T symbol); | |
|
22 | ||
|
23 | /// <summary> | |
|
24 | /// Gets the translation map from the index of the symbol to it's class this is usefull for the optimized input symbols transtaion. | |
|
25 | /// </summary> | |
|
26 | /// <remarks> | |
|
27 | /// The map is continous and start from the symbol with zero code. The last symbol | |
|
28 | /// in the map is the last classified symbol in the alphabet, i.e. the map can be | |
|
29 | /// shorter then the whole alphabet. | |
|
30 | /// </remarks> | |
|
31 | /// <returns>The translation map.</returns> | |
|
32 | public int[] GetTranslationMap() { | |
|
33 | var map = new Dictionary<int, int>(); | |
|
34 | ||
|
35 | int max = 0; | |
|
36 | foreach (var p in Mappings) { | |
|
37 | var index = GetSymbolIndex(p.Key); | |
|
38 | max = Math.Max(max, index); | |
|
39 | map[index] = p.Value; | |
|
40 | } | |
|
41 | ||
|
42 | var result = new int[max + 1]; | |
|
43 | ||
|
44 | for (int i = 0; i < result.Length; i++) | |
|
45 | map.TryGetValue(i, out result[i]); | |
|
46 | ||
|
47 | return result; | |
|
48 | } | |
|
49 | } | |
|
50 | } |
@@ -0,0 +1,84 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | ||
|
5 | namespace Implab.Automaton { | |
|
6 | public class MapAlphabet<T> : IAlphabetBuilder<T> { | |
|
7 | readonly Dictionary<T,int> m_map; | |
|
8 | int m_nextCls; | |
|
9 | readonly bool m_supportUnclassified; | |
|
10 | ||
|
11 | public MapAlphabet(bool supportUnclassified, IEqualityComparer<T> comparer) { | |
|
12 | m_map = comparer != null ? new Dictionary<T, int>(comparer) : new Dictionary<T,int>(); | |
|
13 | m_supportUnclassified = supportUnclassified; | |
|
14 | m_nextCls = supportUnclassified ? 1 : 0; | |
|
15 | } | |
|
16 | ||
|
17 | #region IAlphabetBuilder implementation | |
|
18 | ||
|
19 | public int DefineSymbol(T symbol) { | |
|
20 | int cls; | |
|
21 | return m_map.TryGetValue(symbol, out cls) ? cls : DefineSymbol(symbol, m_nextCls); | |
|
22 | } | |
|
23 | ||
|
24 | public int DefineSymbol(T symbol, int cls) { | |
|
25 | Safe.ArgumentAssert(cls >= 0, "cls"); | |
|
26 | ||
|
27 | m_nextCls = Math.Max(cls + 1, m_nextCls); | |
|
28 | m_map.Add(symbol, cls); | |
|
29 | return cls; | |
|
30 | } | |
|
31 | ||
|
32 | public int DefineClass(IEnumerable<T> symbols) { | |
|
33 | return DefineClass(symbols, m_nextCls); | |
|
34 | } | |
|
35 | ||
|
36 | public int DefineClass(IEnumerable<T> symbols, int cls) { | |
|
37 | Safe.ArgumentAssert(cls >= 0, "cls"); | |
|
38 | Safe.ArgumentNotNull(symbols, "symbols"); | |
|
39 | ||
|
40 | m_nextCls = Math.Max(cls + 1, m_nextCls); | |
|
41 | ||
|
42 | foreach (var symbol in symbols) | |
|
43 | m_map[symbol] = cls; | |
|
44 | return cls; | |
|
45 | } | |
|
46 | ||
|
47 | #endregion | |
|
48 | ||
|
49 | #region IAlphabet implementation | |
|
50 | ||
|
51 | public int Translate(T symbol) { | |
|
52 | int cls; | |
|
53 | if (m_map.TryGetValue(symbol, out cls)) | |
|
54 | return cls; | |
|
55 | if (!m_supportUnclassified) | |
|
56 | throw new ArgumentOutOfRangeException("symbol", "The specified symbol isn't in the alphabet"); | |
|
57 | return AutomatonConst.UNCLASSIFIED_INPUT; | |
|
58 | } | |
|
59 | ||
|
60 | public int Count { | |
|
61 | get { | |
|
62 | return m_nextCls; | |
|
63 | } | |
|
64 | } | |
|
65 | ||
|
66 | public bool Contains(T symbol) { | |
|
67 | return m_supportUnclassified || m_map.ContainsKey(symbol); | |
|
68 | } | |
|
69 | ||
|
70 | ||
|
71 | public IEnumerable<T> GetSymbols(int cls) { | |
|
72 | Safe.ArgumentAssert(!m_supportUnclassified || cls > 0, "cls"); | |
|
73 | return m_map.Where(p => p.Value == cls).Select(p => p.Key); | |
|
74 | } | |
|
75 | #endregion | |
|
76 | ||
|
77 | public IEnumerable<KeyValuePair<T,int>> Mappings { | |
|
78 | get { | |
|
79 | return m_map; | |
|
80 | } | |
|
81 | } | |
|
82 | } | |
|
83 | } | |
|
84 |
@@ -0,0 +1,17 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | ||
|
6 | namespace Implab.Automaton { | |
|
7 | [Serializable] | |
|
8 | public class ParserException : Exception { | |
|
9 | public ParserException() { } | |
|
10 | public ParserException(string message) : base(message) { } | |
|
11 | public ParserException(string message, Exception inner) : base(message, inner) { } | |
|
12 | protected ParserException( | |
|
13 | System.Runtime.Serialization.SerializationInfo info, | |
|
14 | System.Runtime.Serialization.StreamingContext context) | |
|
15 | : base(info, context) { } | |
|
16 | } | |
|
17 | } |
@@ -0,0 +1,17 | |||
|
1 | using System; | |
|
2 | ||
|
3 | namespace Implab.Automaton.RegularExpressions { | |
|
4 | public class AltToken: BinaryToken { | |
|
5 | public AltToken(Token left, Token right) | |
|
6 | : base(left, right) { | |
|
7 | } | |
|
8 | ||
|
9 | public override void Accept(IVisitor visitor) { | |
|
10 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
11 | visitor.Visit(this); | |
|
12 | } | |
|
13 | public override string ToString() { | |
|
14 | return String.Format(Right is BinaryToken ? "{0}|({1})" : "{0}|{1}", Left, Right); | |
|
15 | } | |
|
16 | } | |
|
17 | } |
@@ -0,0 +1,21 | |||
|
1 | using Implab; | |
|
2 | ||
|
3 | namespace Implab.Automaton.RegularExpressions { | |
|
4 | public abstract class BinaryToken: Token { | |
|
5 | readonly Token m_left; | |
|
6 | readonly Token m_right; | |
|
7 | ||
|
8 | public Token Left { | |
|
9 | get { return m_left; } | |
|
10 | } | |
|
11 | ||
|
12 | public Token Right { | |
|
13 | get { return m_right; } | |
|
14 | } | |
|
15 | ||
|
16 | protected BinaryToken(Token left, Token right) { | |
|
17 | Safe.ArgumentNotNull(m_left = left, "left"); | |
|
18 | Safe.ArgumentNotNull(m_right = right, "right"); | |
|
19 | } | |
|
20 | } | |
|
21 | } |
@@ -0,0 +1,22 | |||
|
1 | using System; | |
|
2 | ||
|
3 | namespace Implab.Automaton.RegularExpressions { | |
|
4 | public class CatToken : BinaryToken { | |
|
5 | public CatToken(Token left, Token right) | |
|
6 | : base(left, right) { | |
|
7 | } | |
|
8 | ||
|
9 | public override void Accept(IVisitor visitor) { | |
|
10 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
11 | visitor.Visit(this); | |
|
12 | } | |
|
13 | ||
|
14 | public override string ToString() { | |
|
15 | return String.Format("{0}{1}", FormatToken(Left), FormatToken(Right)); | |
|
16 | } | |
|
17 | ||
|
18 | static string FormatToken(Token token) { | |
|
19 | return String.Format(token is AltToken ? "({0})" : "{0}", token); | |
|
20 | } | |
|
21 | } | |
|
22 | } |
@@ -0,0 +1,13 | |||
|
1 | using Implab; | |
|
2 | ||
|
3 | namespace Implab.Automaton.RegularExpressions { | |
|
4 | public class EmptyToken: Token { | |
|
5 | public override void Accept(IVisitor visitor) { | |
|
6 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
7 | visitor.Visit(this); | |
|
8 | } | |
|
9 | public override string ToString() { | |
|
10 | return "$"; | |
|
11 | } | |
|
12 | } | |
|
13 | } |
@@ -0,0 +1,18 | |||
|
1 | using Implab; | |
|
2 | ||
|
3 | namespace Implab.Automaton.RegularExpressions { | |
|
4 | /// <summary> | |
|
5 | /// Конечный символ расширенного регулярного выражения, при построении ДКА | |
|
6 | /// используется для определения конечных состояний. | |
|
7 | /// </summary> | |
|
8 | public class EndToken: Token { | |
|
9 | ||
|
10 | public override void Accept(IVisitor visitor) { | |
|
11 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
12 | visitor.Visit(this); | |
|
13 | } | |
|
14 | public override string ToString() { | |
|
15 | return "#"; | |
|
16 | } | |
|
17 | } | |
|
18 | } |
@@ -0,0 +1,23 | |||
|
1 | namespace Implab.Automaton.RegularExpressions { | |
|
2 | /// <summary> | |
|
3 | /// Конечный символ расширенного регулярного выражения, при построении ДКА | |
|
4 | /// используется для определения конечных состояний. | |
|
5 | /// </summary> | |
|
6 | public class EndToken<TTag>: EndToken { | |
|
7 | ||
|
8 | readonly TTag m_tag; | |
|
9 | ||
|
10 | public EndToken(TTag tag) { | |
|
11 | m_tag = tag; | |
|
12 | } | |
|
13 | ||
|
14 | public EndToken() | |
|
15 | : this(default(TTag)) { | |
|
16 | } | |
|
17 | ||
|
18 | public TTag Tag { | |
|
19 | get { return m_tag; } | |
|
20 | } | |
|
21 | ||
|
22 | } | |
|
23 | } |
@@ -0,0 +1,7 | |||
|
1 | ||
|
2 | namespace Implab.Automaton.RegularExpressions { | |
|
3 | public interface ITaggedDFABuilder<TTag> : IDFATableBuilder { | |
|
4 | void SetStateTag(int s, TTag[] tags); | |
|
5 | } | |
|
6 | } | |
|
7 |
@@ -0,0 +1,13 | |||
|
1 | namespace Implab.Automaton.RegularExpressions { | |
|
2 | /// <summary> | |
|
3 | /// Интерфейс обходчика синтаксического дерева регулярного выражения | |
|
4 | /// </summary> | |
|
5 | public interface IVisitor { | |
|
6 | void Visit(AltToken token); | |
|
7 | void Visit(StarToken token); | |
|
8 | void Visit(CatToken token); | |
|
9 | void Visit(EmptyToken token); | |
|
10 | void Visit(EndToken token); | |
|
11 | void Visit(SymbolToken token); | |
|
12 | } | |
|
13 | } |
@@ -0,0 +1,91 | |||
|
1 | using System.Collections.Generic; | |
|
2 | using System.Linq; | |
|
3 | ||
|
4 | namespace Implab.Automaton.RegularExpressions { | |
|
5 | public class RegularDFA<TInput, TTag> : DFATable, ITaggedDFABuilder<TTag> { | |
|
6 | ||
|
7 | readonly Dictionary<int,TTag[]> m_tags = new Dictionary<int, TTag[]>(); | |
|
8 | readonly IAlphabet<TInput> m_alphabet; | |
|
9 | ||
|
10 | public RegularDFA(IAlphabet<TInput> alphabet) { | |
|
11 | Safe.ArgumentNotNull(alphabet, "aplhabet"); | |
|
12 | ||
|
13 | m_alphabet = alphabet; | |
|
14 | } | |
|
15 | ||
|
16 | ||
|
17 | public IAlphabet<TInput> InputAlphabet { | |
|
18 | get { | |
|
19 | return m_alphabet; | |
|
20 | } | |
|
21 | } | |
|
22 | ||
|
23 | public void MarkFinalState(int s, TTag[] tags) { | |
|
24 | MarkFinalState(s); | |
|
25 | SetStateTag(s, tags); | |
|
26 | } | |
|
27 | ||
|
28 | public void SetStateTag(int s, TTag[] tags) { | |
|
29 | Safe.ArgumentNotNull(tags, "tags"); | |
|
30 | m_tags[s] = tags; | |
|
31 | } | |
|
32 | ||
|
33 | public TTag[] GetStateTag(int s) { | |
|
34 | TTag[] tags; | |
|
35 | return m_tags.TryGetValue(s, out tags) ? tags : new TTag[0]; | |
|
36 | } | |
|
37 | ||
|
38 | public TTag[][] CreateTagTable() { | |
|
39 | var table = new TTag[StateCount][]; | |
|
40 | ||
|
41 | foreach (var pair in m_tags) | |
|
42 | table[pair.Key] = pair.Value; | |
|
43 | ||
|
44 | return table; | |
|
45 | } | |
|
46 | ||
|
47 | /// <summary> | |
|
48 | /// Optimize the specified alphabet. | |
|
49 | /// </summary> | |
|
50 | /// <param name="alphabet">Пустой алфавит, который будет зполнен в процессе оптимизации.</param> | |
|
51 | public RegularDFA<TInput,TTag> Optimize(IAlphabetBuilder<TInput> alphabet) { | |
|
52 | Safe.ArgumentNotNull(alphabet, "alphabet"); | |
|
53 | ||
|
54 | var dfa = new RegularDFA<TInput, TTag>(alphabet); | |
|
55 | ||
|
56 | var alphaMap = new Dictionary<int,int>(); | |
|
57 | var stateMap = new Dictionary<int,int>(); | |
|
58 | ||
|
59 | Optimize(dfa, alphaMap, stateMap); | |
|
60 | ||
|
61 | // mark tags in the new DFA | |
|
62 | foreach (var g in m_tags.Where(x => x.Key < StateCount).GroupBy(x => stateMap[x.Key], x => x.Value )) | |
|
63 | dfa.SetStateTag(g.Key, g.SelectMany(x => x).ToArray()); | |
|
64 | ||
|
65 | // make the alphabet for the new DFA | |
|
66 | // skip all unclassified symbols | |
|
67 | foreach (var pair in alphaMap.Where(x => x.Value != 0)) | |
|
68 | alphabet.DefineClass(m_alphabet.GetSymbols(pair.Key), pair.Value); | |
|
69 | return dfa; | |
|
70 | } | |
|
71 | ||
|
72 | protected override IEnumerable<HashSet<int>> SplitFinalStates(IEnumerable<int> states) { | |
|
73 | var arrayComparer = new CustomEqualityComparer<TTag[]>( | |
|
74 | (x,y) => x.Length == y.Length && x.All(it => y.Contains(it)), | |
|
75 | x => x.Sum(it => x.GetHashCode()) | |
|
76 | ); | |
|
77 | return states.GroupBy(x => m_tags[x] ?? new TTag[0], arrayComparer).Select(g => new HashSet<int>(g)); | |
|
78 | } | |
|
79 | ||
|
80 | public override string ToString() { | |
|
81 | var states = new MapAlphabet<string>(false, null); | |
|
82 | ||
|
83 | for (int i = 0; i < StateCount; i++) | |
|
84 | states.DefineSymbol(string.Format("s{0}", i), i); | |
|
85 | ||
|
86 | return string.Format("//[RegularDFA {1} x {2}]\n{0}", PrintDFA(InputAlphabet, states),StateCount, AlphabetSize); | |
|
87 | } | |
|
88 | ||
|
89 | } | |
|
90 | } | |
|
91 |
@@ -0,0 +1,212 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Diagnostics; | |
|
5 | using System.Linq; | |
|
6 | ||
|
7 | namespace Implab.Automaton.RegularExpressions { | |
|
8 | /// <summary> | |
|
9 | /// Используется для построения ДКА по регулярному выражению, сначала обходит | |
|
10 | /// регулярное выражение и вычисляет followpos, затем используется метод | |
|
11 | /// <see cref="BuildDFA(IDFADefinition)"/> для построения автомата. | |
|
12 | /// </summary> | |
|
13 | public class RegularExpressionVisitor : IVisitor { | |
|
14 | int m_idx; | |
|
15 | Token m_root; | |
|
16 | HashSet<int> m_firstpos; | |
|
17 | HashSet<int> m_lastpos; | |
|
18 | ||
|
19 | readonly Dictionary<int, HashSet<int>> m_followpos = new Dictionary<int, HashSet<int>>(); | |
|
20 | readonly Dictionary<int, int> m_indexes = new Dictionary<int, int>(); | |
|
21 | readonly HashSet<int> m_ends = new HashSet<int>(); | |
|
22 | ||
|
23 | readonly IDFATableBuilder m_builder; | |
|
24 | readonly IAlphabetBuilder<HashSet<int>> m_states = new MapAlphabet<HashSet<int>>( | |
|
25 | false, | |
|
26 | new CustomEqualityComparer<HashSet<int>>( | |
|
27 | (x, y) => x.SetEquals(y), | |
|
28 | x => x.Sum(n => n.GetHashCode()) | |
|
29 | ) | |
|
30 | ); | |
|
31 | ||
|
32 | public RegularExpressionVisitor(IDFATableBuilder builder) { | |
|
33 | Safe.ArgumentNotNull(builder, "builder"); | |
|
34 | ||
|
35 | m_builder = builder; | |
|
36 | } | |
|
37 | ||
|
38 | HashSet<int> Followpos(int pos) { | |
|
39 | HashSet<int> set; | |
|
40 | return m_followpos.TryGetValue(pos, out set) ? set : m_followpos[pos] = new HashSet<int>(); | |
|
41 | } | |
|
42 | ||
|
43 | bool Nullable(object n) { | |
|
44 | if (n is EmptyToken || n is StarToken) | |
|
45 | return true; | |
|
46 | var altToken = n as AltToken; | |
|
47 | if (altToken != null) | |
|
48 | return Nullable(altToken.Left) || Nullable(altToken.Right); | |
|
49 | var catToken = n as CatToken; | |
|
50 | if (catToken != null) | |
|
51 | return Nullable(catToken.Left) && Nullable(catToken.Right); | |
|
52 | return false; | |
|
53 | } | |
|
54 | ||
|
55 | protected int Index { | |
|
56 | get { return m_idx; } | |
|
57 | } | |
|
58 | ||
|
59 | public void Visit(AltToken token) { | |
|
60 | if (m_root == null) | |
|
61 | m_root = token; | |
|
62 | var firtspos = new HashSet<int>(); | |
|
63 | var lastpos = new HashSet<int>(); | |
|
64 | ||
|
65 | token.Left.Accept(this); | |
|
66 | firtspos.UnionWith(m_firstpos); | |
|
67 | lastpos.UnionWith(m_lastpos); | |
|
68 | ||
|
69 | token.Right.Accept(this); | |
|
70 | firtspos.UnionWith(m_firstpos); | |
|
71 | lastpos.UnionWith(m_lastpos); | |
|
72 | ||
|
73 | m_firstpos = firtspos; | |
|
74 | m_lastpos = lastpos; | |
|
75 | } | |
|
76 | ||
|
77 | public void Visit(StarToken token) { | |
|
78 | if (m_root == null) | |
|
79 | m_root = token; | |
|
80 | token.Token.Accept(this); | |
|
81 | ||
|
82 | foreach (var i in m_lastpos) | |
|
83 | Followpos(i).UnionWith(m_firstpos); | |
|
84 | } | |
|
85 | ||
|
86 | public void Visit(CatToken token) { | |
|
87 | if (m_root == null) | |
|
88 | m_root = token; | |
|
89 | ||
|
90 | var firtspos = new HashSet<int>(); | |
|
91 | var lastpos = new HashSet<int>(); | |
|
92 | token.Left.Accept(this); | |
|
93 | firtspos.UnionWith(m_firstpos); | |
|
94 | var leftLastpos = m_lastpos; | |
|
95 | ||
|
96 | token.Right.Accept(this); | |
|
97 | lastpos.UnionWith(m_lastpos); | |
|
98 | var rightFirstpos = m_firstpos; | |
|
99 | ||
|
100 | if (Nullable(token.Left)) | |
|
101 | firtspos.UnionWith(rightFirstpos); | |
|
102 | ||
|
103 | if (Nullable(token.Right)) | |
|
104 | lastpos.UnionWith(leftLastpos); | |
|
105 | ||
|
106 | m_firstpos = firtspos; | |
|
107 | m_lastpos = lastpos; | |
|
108 | ||
|
109 | foreach (var i in leftLastpos) | |
|
110 | Followpos(i).UnionWith(rightFirstpos); | |
|
111 | ||
|
112 | } | |
|
113 | ||
|
114 | public void Visit(EmptyToken token) { | |
|
115 | if (m_root == null) | |
|
116 | m_root = token; | |
|
117 | } | |
|
118 | ||
|
119 | public void Visit(SymbolToken token) { | |
|
120 | if (m_root == null) | |
|
121 | m_root = token; | |
|
122 | m_idx++; | |
|
123 | m_indexes[m_idx] = token.Value; | |
|
124 | m_firstpos = new HashSet<int>(new[] { m_idx }); | |
|
125 | m_lastpos = new HashSet<int>(new[] { m_idx }); | |
|
126 | } | |
|
127 | ||
|
128 | public virtual void Visit(EndToken token) { | |
|
129 | if (m_root == null) | |
|
130 | m_root = token; | |
|
131 | m_idx++; | |
|
132 | m_indexes[m_idx] = AutomatonConst.UNCLASSIFIED_INPUT; | |
|
133 | m_firstpos = new HashSet<int>(new[] { m_idx }); | |
|
134 | m_lastpos = new HashSet<int>(new[] { m_idx }); | |
|
135 | Followpos(m_idx); | |
|
136 | m_ends.Add(m_idx); | |
|
137 | } | |
|
138 | ||
|
139 | public void BuildDFA() { | |
|
140 | AddState(m_firstpos); | |
|
141 | SetInitialState(m_firstpos); | |
|
142 | ||
|
143 | if(IsFinal(m_firstpos)) | |
|
144 | MarkFinalState(m_firstpos); | |
|
145 | ||
|
146 | var inputMax = m_indexes.Values.Max(); | |
|
147 | var queue = new Queue<HashSet<int>>(); | |
|
148 | ||
|
149 | queue.Enqueue(m_firstpos); | |
|
150 | ||
|
151 | while (queue.Count > 0) { | |
|
152 | var s1 = queue.Dequeue(); | |
|
153 | ||
|
154 | for (int a = 0; a <= inputMax; a++) { | |
|
155 | var s2 = new HashSet<int>(); | |
|
156 | foreach (var p in s1) { | |
|
157 | if (m_indexes[p] == a) { | |
|
158 | s2.UnionWith(Followpos(p)); | |
|
159 | } | |
|
160 | } | |
|
161 | if (s2.Count > 0) { | |
|
162 | if (!HasState(s2)) { | |
|
163 | AddState(s2); | |
|
164 | if (IsFinal(s2)) | |
|
165 | MarkFinalState(s2); | |
|
166 | ||
|
167 | queue.Enqueue(s2); | |
|
168 | } | |
|
169 | ||
|
170 | DefineTransition(s1, s2, a); | |
|
171 | } | |
|
172 | ||
|
173 | } | |
|
174 | } | |
|
175 | } | |
|
176 | ||
|
177 | protected bool HasState(HashSet<int> state) { | |
|
178 | return m_states.Contains(state); | |
|
179 | } | |
|
180 | ||
|
181 | protected void AddState(HashSet<int> state) { | |
|
182 | Debug.Assert(!HasState(state)); | |
|
183 | ||
|
184 | m_states.DefineSymbol(state); | |
|
185 | } | |
|
186 | ||
|
187 | protected int Translate(HashSet<int> state) { | |
|
188 | Debug.Assert(HasState(state)); | |
|
189 | ||
|
190 | return m_states.Translate(state); | |
|
191 | } | |
|
192 | ||
|
193 | protected virtual void SetInitialState(HashSet<int> state) { | |
|
194 | m_builder.SetInitialState(Translate(state)); | |
|
195 | } | |
|
196 | ||
|
197 | protected virtual void MarkFinalState(HashSet<int> state) { | |
|
198 | m_builder.MarkFinalState(Translate(state)); | |
|
199 | } | |
|
200 | ||
|
201 | protected virtual void DefineTransition(HashSet<int> s1, HashSet<int> s2, int ch) { | |
|
202 | ||
|
203 | m_builder.Add(new AutomatonTransition(Translate(s1), Translate(s2), ch)); | |
|
204 | } | |
|
205 | ||
|
206 | bool IsFinal(IEnumerable<int> state) { | |
|
207 | Debug.Assert(state != null); | |
|
208 | return state.Any(m_ends.Contains); | |
|
209 | } | |
|
210 | ||
|
211 | } | |
|
212 | } |
@@ -0,0 +1,37 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Diagnostics; | |
|
5 | using System.Linq; | |
|
6 | ||
|
7 | namespace Implab.Automaton.RegularExpressions { | |
|
8 | /// <summary> | |
|
9 | /// </summary> | |
|
10 | public class RegularExpressionVisitor<TTag> : RegularExpressionVisitor { | |
|
11 | readonly Dictionary<int, TTag> m_tags = new Dictionary<int, TTag>(); | |
|
12 | ||
|
13 | readonly ITaggedDFABuilder<TTag> m_builder; | |
|
14 | ||
|
15 | public RegularExpressionVisitor(ITaggedDFABuilder<TTag> builder) : base(builder) { | |
|
16 | m_builder = builder; | |
|
17 | } | |
|
18 | ||
|
19 | public override void Visit(EndToken token) { | |
|
20 | base.Visit(token); | |
|
21 | var tagged = token as EndToken<TTag>; | |
|
22 | if (tagged != null) | |
|
23 | m_tags.Add(Index, tagged.Tag); | |
|
24 | } | |
|
25 | ||
|
26 | protected override void MarkFinalState(HashSet<int> state) { | |
|
27 | base.MarkFinalState(state); | |
|
28 | m_builder.SetStateTag(Translate(state), GetStateTags(state)); | |
|
29 | } | |
|
30 | ||
|
31 | TTag[] GetStateTags(IEnumerable<int> state) { | |
|
32 | Debug.Assert(state != null); | |
|
33 | return state.Where(m_tags.ContainsKey).Select(pos => m_tags[pos]).ToArray(); | |
|
34 | } | |
|
35 | ||
|
36 | } | |
|
37 | } |
@@ -0,0 +1,31 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | ||
|
4 | ||
|
5 | namespace Implab.Automaton.RegularExpressions { | |
|
6 | /// <summary> | |
|
7 | /// Замыкание выражения с 0 и более повторов. | |
|
8 | /// </summary> | |
|
9 | public class StarToken: Token { | |
|
10 | ||
|
11 | Token m_token; | |
|
12 | ||
|
13 | public Token Token { | |
|
14 | get { return m_token; } | |
|
15 | } | |
|
16 | ||
|
17 | public StarToken(Token token) { | |
|
18 | Safe.ArgumentNotNull(token, "token"); | |
|
19 | m_token = token; | |
|
20 | } | |
|
21 | ||
|
22 | public override void Accept(IVisitor visitor) { | |
|
23 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
24 | visitor.Visit(this); | |
|
25 | } | |
|
26 | ||
|
27 | public override string ToString() { | |
|
28 | return String.Format("({0})*", Token); | |
|
29 | } | |
|
30 | } | |
|
31 | } |
@@ -0,0 +1,27 | |||
|
1 | using Implab; | |
|
2 | ||
|
3 | namespace Implab.Automaton.RegularExpressions { | |
|
4 | /// <summary> | |
|
5 | /// Выражение, соответсвующее одному символу. | |
|
6 | /// </summary> | |
|
7 | public class SymbolToken: Token { | |
|
8 | int m_value; | |
|
9 | ||
|
10 | public int Value { | |
|
11 | get { return m_value; } | |
|
12 | } | |
|
13 | ||
|
14 | public SymbolToken(int value) { | |
|
15 | m_value = value; | |
|
16 | } | |
|
17 | public override void Accept(IVisitor visitor) { | |
|
18 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
19 | ||
|
20 | visitor.Visit(this); | |
|
21 | } | |
|
22 | ||
|
23 | public override string ToString() { | |
|
24 | return Value.ToString(); | |
|
25 | } | |
|
26 | } | |
|
27 | } |
@@ -0,0 +1,63 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Linq; | |
|
4 | ||
|
5 | namespace Implab.Automaton.RegularExpressions { | |
|
6 | public abstract class Token { | |
|
7 | public abstract void Accept(IVisitor visitor); | |
|
8 | ||
|
9 | public Token End() { | |
|
10 | return Cat(new EndToken()); | |
|
11 | } | |
|
12 | ||
|
13 | public Token Tag<TTag>(TTag tag) { | |
|
14 | return Cat(new EndToken<TTag>(tag)); | |
|
15 | } | |
|
16 | ||
|
17 | public Token Cat(Token right) { | |
|
18 | return new CatToken(this, right); | |
|
19 | } | |
|
20 | ||
|
21 | public Token Or(Token right) { | |
|
22 | return new AltToken(this, right); | |
|
23 | } | |
|
24 | ||
|
25 | public Token Optional() { | |
|
26 | return Or(new EmptyToken()); | |
|
27 | } | |
|
28 | ||
|
29 | public Token EClosure() { | |
|
30 | return new StarToken(this); | |
|
31 | } | |
|
32 | ||
|
33 | public Token Closure() { | |
|
34 | return Cat(new StarToken(this)); | |
|
35 | } | |
|
36 | ||
|
37 | public Token Repeat(int count) { | |
|
38 | Token token = null; | |
|
39 | ||
|
40 | for (int i = 0; i < count; i++) | |
|
41 | token = token != null ? token.Cat(this) : this; | |
|
42 | return token ?? new EmptyToken(); | |
|
43 | } | |
|
44 | ||
|
45 | public Token Repeat(int min, int max) { | |
|
46 | if (min > max || min < 1) | |
|
47 | throw new ArgumentOutOfRangeException(); | |
|
48 | var token = Repeat(min); | |
|
49 | ||
|
50 | for (int i = min; i < max; i++) | |
|
51 | token = token.Cat( Optional() ); | |
|
52 | return token; | |
|
53 | } | |
|
54 | ||
|
55 | public static Token New(params int[] set) { | |
|
56 | Safe.ArgumentNotNull(set, "set"); | |
|
57 | Token token = null; | |
|
58 | foreach(var c in set.Distinct()) | |
|
59 | token = token == null ? new SymbolToken(c) : token.Or(new SymbolToken(c)); | |
|
60 | return token; | |
|
61 | } | |
|
62 | } | |
|
63 | } |
@@ -0,0 +1,64 | |||
|
1 | using System; | |
|
2 | using System.Threading; | |
|
3 | ||
|
4 | namespace Implab.Components { | |
|
5 | /// <summary> | |
|
6 | /// Creates an instace on-demand and allows it to be garbage collected. | |
|
7 | /// </summary> | |
|
8 | /// <remarks> | |
|
9 | /// Usefull when dealing with memory-intensive objects which are frequently used. | |
|
10 | /// This class is similar to <see cref="ObjectPool{T}"/> except it is a singleton. | |
|
11 | /// </remarks> | |
|
12 | public class LazyAndWeak<T> where T : class { | |
|
13 | ||
|
14 | readonly Func<T> m_factory; | |
|
15 | readonly object m_lock; | |
|
16 | WeakReference m_reference; | |
|
17 | ||
|
18 | ||
|
19 | public LazyAndWeak(Func<T> factory, bool useLock) { | |
|
20 | Safe.ArgumentNotNull(factory, "factory"); | |
|
21 | m_factory = factory; | |
|
22 | m_lock = useLock ? new object() : null; | |
|
23 | } | |
|
24 | ||
|
25 | public LazyAndWeak(Func<T> factory) : this(factory, false) { | |
|
26 | } | |
|
27 | ||
|
28 | public T Value { | |
|
29 | get { | |
|
30 | while (true) { | |
|
31 | var weak = m_reference; | |
|
32 | T value; | |
|
33 | if (weak != null) { | |
|
34 | value = weak.Target as T; | |
|
35 | if (value != null) | |
|
36 | return value; | |
|
37 | } | |
|
38 | ||
|
39 | if (m_lock == null) { | |
|
40 | value = m_factory(); | |
|
41 | ||
|
42 | if (Interlocked.CompareExchange(ref m_reference, new WeakReference(value), weak) == weak) | |
|
43 | return value; | |
|
44 | } else { | |
|
45 | lock (m_lock) { | |
|
46 | // double check | |
|
47 | weak = m_reference; | |
|
48 | if (weak != null) { | |
|
49 | value = weak.Target as T; | |
|
50 | if (value != null) | |
|
51 | return value; | |
|
52 | } | |
|
53 | // we are safe to write | |
|
54 | value = m_factory(); | |
|
55 | m_reference = new WeakReference(value); | |
|
56 | return value; | |
|
57 | } | |
|
58 | } | |
|
59 | } | |
|
60 | } | |
|
61 | } | |
|
62 | } | |
|
63 | } | |
|
64 |
@@ -0,0 +1,23 | |||
|
1 | using System.Collections.Generic; | |
|
2 | using System.Linq; | |
|
3 | using Implab.Automaton; | |
|
4 | ||
|
5 | namespace Implab.Formats { | |
|
6 | public class ByteAlphabet : IndexedAlphabetBase<byte> { | |
|
7 | ||
|
8 | #region implemented abstract members of IndexedAlphabetBase | |
|
9 | ||
|
10 | public override int GetSymbolIndex(byte symbol) { | |
|
11 | return (int)symbol; | |
|
12 | } | |
|
13 | ||
|
14 | public IEnumerable<byte> InputSymbols { | |
|
15 | get { | |
|
16 | return Enumerable.Range(byte.MinValue, byte.MaxValue).Cast<byte>(); | |
|
17 | } | |
|
18 | } | |
|
19 | ||
|
20 | #endregion | |
|
21 | } | |
|
22 | } | |
|
23 |
@@ -0,0 +1,16 | |||
|
1 | using System.Collections.Generic; | |
|
2 | using System.Linq; | |
|
3 | using Implab.Automaton; | |
|
4 | ||
|
5 | namespace Implab.Formats { | |
|
6 | public class CharAlphabet: IndexedAlphabetBase<char> { | |
|
7 | ||
|
8 | public override int GetSymbolIndex(char symbol) { | |
|
9 | return symbol; | |
|
10 | } | |
|
11 | ||
|
12 | public IEnumerable<char> InputSymbols { | |
|
13 | get { return Enumerable.Range(char.MinValue, char.MaxValue).Cast<char>(); } | |
|
14 | } | |
|
15 | } | |
|
16 | } |
@@ -0,0 +1,99 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using Implab.Automaton; | |
|
6 | using Implab.Automaton.RegularExpressions; | |
|
7 | ||
|
8 | namespace Implab.Formats { | |
|
9 | /// <summary> | |
|
10 | /// Базовый абстрактный класс. Грамматика, позволяет формулировать выражения над алфавитом типа <c>char</c>. | |
|
11 | /// </summary> | |
|
12 | public abstract class Grammar<TSymbol> { | |
|
13 | ||
|
14 | protected abstract IAlphabetBuilder<TSymbol> AlphabetBuilder { | |
|
15 | get; | |
|
16 | } | |
|
17 | ||
|
18 | protected SymbolToken UnclassifiedToken() { | |
|
19 | return new SymbolToken(AutomatonConst.UNCLASSIFIED_INPUT); | |
|
20 | } | |
|
21 | ||
|
22 | protected void DefineAlphabet(IEnumerable<TSymbol> alphabet) { | |
|
23 | Safe.ArgumentNotNull(alphabet, "alphabet"); | |
|
24 | ||
|
25 | foreach (var ch in alphabet) | |
|
26 | AlphabetBuilder.DefineSymbol(ch); | |
|
27 | } | |
|
28 | ||
|
29 | protected Token SymbolToken(TSymbol symbol) { | |
|
30 | return Token.New(TranslateOrAdd(symbol)); | |
|
31 | } | |
|
32 | ||
|
33 | protected Token SymbolToken(IEnumerable<TSymbol> symbols) { | |
|
34 | Safe.ArgumentNotNull(symbols, "symbols"); | |
|
35 | ||
|
36 | return Token.New(TranslateOrAdd(symbols).ToArray()); | |
|
37 | } | |
|
38 | ||
|
39 | protected Token SymbolSetToken(params TSymbol[] set) { | |
|
40 | return SymbolToken(set); | |
|
41 | } | |
|
42 | ||
|
43 | int TranslateOrAdd(TSymbol ch) { | |
|
44 | var t = AlphabetBuilder.Translate(ch); | |
|
45 | if (t == AutomatonConst.UNCLASSIFIED_INPUT) | |
|
46 | t = AlphabetBuilder.DefineSymbol(ch); | |
|
47 | return t; | |
|
48 | } | |
|
49 | ||
|
50 | IEnumerable<int> TranslateOrAdd(IEnumerable<TSymbol> symbols) { | |
|
51 | return symbols.Distinct().Select(TranslateOrAdd); | |
|
52 | } | |
|
53 | ||
|
54 | int TranslateOrDie(TSymbol ch) { | |
|
55 | var t = AlphabetBuilder.Translate(ch); | |
|
56 | if (t == AutomatonConst.UNCLASSIFIED_INPUT) | |
|
57 | throw new ApplicationException(String.Format("Symbol '{0}' is UNCLASSIFIED", ch)); | |
|
58 | return t; | |
|
59 | } | |
|
60 | ||
|
61 | IEnumerable<int> TranslateOrDie(IEnumerable<TSymbol> symbols) { | |
|
62 | return symbols.Distinct().Select(TranslateOrDie); | |
|
63 | } | |
|
64 | ||
|
65 | protected Token SymbolTokenExcept(IEnumerable<TSymbol> symbols) { | |
|
66 | Safe.ArgumentNotNull(symbols, "symbols"); | |
|
67 | ||
|
68 | return Token.New( Enumerable.Range(0, AlphabetBuilder.Count).Except(TranslateOrDie(symbols)).ToArray() ); | |
|
69 | } | |
|
70 | ||
|
71 | protected abstract IndexedAlphabetBase<TSymbol> CreateAlphabet(); | |
|
72 | ||
|
73 | protected ScannerContext<TTag> BuildScannerContext<TTag>(Token regexp) { | |
|
74 | ||
|
75 | var dfa = new RegularDFA<TSymbol, TTag>(AlphabetBuilder); | |
|
76 | ||
|
77 | var visitor = new RegularExpressionVisitor<TTag>(dfa); | |
|
78 | regexp.Accept(visitor); | |
|
79 | visitor.BuildDFA(); | |
|
80 | ||
|
81 | if (dfa.IsFinalState(dfa.InitialState)) | |
|
82 | throw new ApplicationException("The specified language contains empty token"); | |
|
83 | ||
|
84 | var ab = CreateAlphabet(); | |
|
85 | var optimal = dfa.Optimize(ab); | |
|
86 | ||
|
87 | return new ScannerContext<TTag>( | |
|
88 | optimal.CreateTransitionTable(), | |
|
89 | optimal.CreateFinalStateTable(), | |
|
90 | optimal.CreateTagTable(), | |
|
91 | optimal.InitialState, | |
|
92 | ab.GetTranslationMap() | |
|
93 | ); | |
|
94 | } | |
|
95 | ||
|
96 | } | |
|
97 | ||
|
98 | ||
|
99 | } |
@@ -0,0 +1,11 | |||
|
1 | namespace Implab.Formats.JSON { | |
|
2 | /// <summary> | |
|
3 | /// internal | |
|
4 | /// </summary> | |
|
5 | enum JSONElementContext { | |
|
6 | None, | |
|
7 | Object, | |
|
8 | Array, | |
|
9 | Closed | |
|
10 | } | |
|
11 | } |
@@ -0,0 +1,28 | |||
|
1 | namespace Implab.Formats.JSON { | |
|
2 | /// <summary> | |
|
3 | /// Тип элемента на котором находится парсер | |
|
4 | /// </summary> | |
|
5 | public enum JSONElementType { | |
|
6 | None, | |
|
7 | /// <summary> | |
|
8 | /// Начало объекта | |
|
9 | /// </summary> | |
|
10 | BeginObject, | |
|
11 | /// <summary> | |
|
12 | /// Конец объекта | |
|
13 | /// </summary> | |
|
14 | EndObject, | |
|
15 | /// <summary> | |
|
16 | /// Начало массива | |
|
17 | /// </summary> | |
|
18 | BeginArray, | |
|
19 | /// <summary> | |
|
20 | /// Конец массива | |
|
21 | /// </summary> | |
|
22 | EndArray, | |
|
23 | /// <summary> | |
|
24 | /// Простое значение | |
|
25 | /// </summary> | |
|
26 | Value | |
|
27 | } | |
|
28 | } |
@@ -0,0 +1,121 | |||
|
1 | using System.Linq; | |
|
2 | using Implab.Automaton.RegularExpressions; | |
|
3 | using System; | |
|
4 | using Implab.Automaton; | |
|
5 | using Implab.Components; | |
|
6 | ||
|
7 | namespace Implab.Formats.JSON { | |
|
8 | class JSONGrammar : Grammar<char> { | |
|
9 | public enum TokenType { | |
|
10 | None, | |
|
11 | BeginObject, | |
|
12 | EndObject, | |
|
13 | BeginArray, | |
|
14 | EndArray, | |
|
15 | String, | |
|
16 | Number, | |
|
17 | Literal, | |
|
18 | NameSeparator, | |
|
19 | ValueSeparator, | |
|
20 | Whitespace, | |
|
21 | ||
|
22 | StringBound, | |
|
23 | EscapedChar, | |
|
24 | UnescapedChar, | |
|
25 | EscapedUnicode | |
|
26 | } | |
|
27 | ||
|
28 | static LazyAndWeak<JSONGrammar> _instance = new LazyAndWeak<JSONGrammar>(() => new JSONGrammar()); | |
|
29 | ||
|
30 | public static JSONGrammar Instance { | |
|
31 | get { return _instance.Value; } | |
|
32 | } | |
|
33 | ||
|
34 | readonly ScannerContext<TokenType> m_jsonExpression; | |
|
35 | readonly ScannerContext<TokenType> m_stringExpression; | |
|
36 | readonly CharAlphabet m_defaultAlphabet = new CharAlphabet(); | |
|
37 | ||
|
38 | public JSONGrammar() { | |
|
39 | DefineAlphabet(Enumerable.Range(0, 0x20).Select(x => (char)x)); | |
|
40 | var hexDigit = SymbolRangeToken('a','f').Or(SymbolRangeToken('A','F')).Or(SymbolRangeToken('0','9')); | |
|
41 | var digit9 = SymbolRangeToken('1', '9'); | |
|
42 | var zero = SymbolToken('0'); | |
|
43 | var digit = zero.Or(digit9); | |
|
44 | var dot = SymbolToken('.'); | |
|
45 | var minus = SymbolToken('-'); | |
|
46 | var sign = SymbolSetToken('-', '+'); | |
|
47 | var expSign = SymbolSetToken('e', 'E'); | |
|
48 | var letters = SymbolRangeToken('a', 'z'); | |
|
49 | var integer = zero.Or(digit9.Cat(digit.EClosure())); | |
|
50 | var frac = dot.Cat(digit.Closure()); | |
|
51 | var exp = expSign.Cat(sign.Optional()).Cat(digit.Closure()); | |
|
52 | var quote = SymbolToken('"'); | |
|
53 | var backSlash = SymbolToken('\\'); | |
|
54 | var specialEscapeChars = SymbolSetToken('\\', '"', '/', 'b', 'f', 't', 'n', 'r'); | |
|
55 | var unicodeEspace = SymbolToken('u').Cat(hexDigit.Repeat(4)); | |
|
56 | var whitespace = SymbolSetToken('\n', '\r', '\t', ' ').EClosure(); | |
|
57 | var beginObject = whitespace.Cat(SymbolToken('{')).Cat(whitespace); | |
|
58 | var endObject = whitespace.Cat(SymbolToken('}')).Cat(whitespace); | |
|
59 | var beginArray = whitespace.Cat(SymbolToken('[')).Cat(whitespace); | |
|
60 | var endArray = whitespace.Cat(SymbolToken(']')).Cat(whitespace); | |
|
61 | var nameSep = whitespace.Cat(SymbolToken(':')).Cat(whitespace); | |
|
62 | var valueSep = whitespace.Cat(SymbolToken(',')).Cat(whitespace); | |
|
63 | ||
|
64 | var number = minus.Optional().Cat(integer).Cat(frac.Optional()).Cat(exp.Optional()); | |
|
65 | var literal = letters.Closure(); | |
|
66 | var unescaped = SymbolTokenExcept(Enumerable.Range(0, 0x20).Union(new int[] { '\\', '"' }).Select(x => (char)x)); | |
|
67 | ||
|
68 | var jsonExpression = | |
|
69 | number.Tag(TokenType.Number) | |
|
70 | .Or(literal.Tag(TokenType.Literal)) | |
|
71 | .Or(quote.Tag(TokenType.StringBound)) | |
|
72 | .Or(beginObject.Tag(TokenType.BeginObject)) | |
|
73 | .Or(endObject.Tag(TokenType.EndObject)) | |
|
74 | .Or(beginArray.Tag(TokenType.BeginArray)) | |
|
75 | .Or(endArray.Tag(TokenType.EndArray)) | |
|
76 | .Or(nameSep.Tag(TokenType.NameSeparator)) | |
|
77 | .Or(valueSep.Tag(TokenType.ValueSeparator)) | |
|
78 | .Or(SymbolSetToken('\n', '\r', '\t', ' ').Closure().Tag(TokenType.Whitespace)); | |
|
79 | ||
|
80 | ||
|
81 | var jsonStringExpression = | |
|
82 | quote.Tag(TokenType.StringBound) | |
|
83 | .Or(backSlash.Cat(specialEscapeChars).Tag(TokenType.EscapedChar)) | |
|
84 | .Or(backSlash.Cat(unicodeEspace).Tag(TokenType.EscapedUnicode)) | |
|
85 | .Or(unescaped.Closure().Tag(TokenType.UnescapedChar)); | |
|
86 | ||
|
87 | ||
|
88 | m_jsonExpression = BuildScannerContext<TokenType>(jsonExpression); | |
|
89 | m_stringExpression = BuildScannerContext<TokenType>(jsonStringExpression); | |
|
90 | ||
|
91 | ||
|
92 | } | |
|
93 | ||
|
94 | protected override IAlphabetBuilder<char> AlphabetBuilder { | |
|
95 | get { | |
|
96 | return m_defaultAlphabet; | |
|
97 | } | |
|
98 | } | |
|
99 | ||
|
100 | public ScannerContext<TokenType> JsonExpression { | |
|
101 | get { | |
|
102 | return m_jsonExpression; | |
|
103 | } | |
|
104 | } | |
|
105 | ||
|
106 | public ScannerContext<TokenType> JsonStringExpression { | |
|
107 | get { | |
|
108 | return m_stringExpression; | |
|
109 | } | |
|
110 | } | |
|
111 | ||
|
112 | Token SymbolRangeToken(char start, char stop) { | |
|
113 | return SymbolToken(Enumerable.Range(start, stop - start + 1).Select(x => (char)x)); | |
|
114 | } | |
|
115 | ||
|
116 | protected override IndexedAlphabetBase<char> CreateAlphabet() { | |
|
117 | return new CharAlphabet(); | |
|
118 | } | |
|
119 | ||
|
120 | } | |
|
121 | } |
@@ -0,0 +1,293 | |||
|
1 | using System; | |
|
2 | using System.Diagnostics; | |
|
3 | using System.IO; | |
|
4 | using Implab.Automaton; | |
|
5 | using Implab.Automaton.RegularExpressions; | |
|
6 | using System.Linq; | |
|
7 | using Implab.Components; | |
|
8 | using System.Collections.Generic; | |
|
9 | ||
|
10 | namespace Implab.Formats.JSON { | |
|
11 | /// <summary> | |
|
12 | /// Pull парсер JSON данных. | |
|
13 | /// </summary> | |
|
14 | /// <remarks> | |
|
15 | /// Следует отметить отдельную интерпретацию свойства <see cref="Level"/>, | |
|
16 | /// оно означает текущий уровень вложенности объектов, однако закрывающий | |
|
17 | /// элемент объекта и массива имеет уровень меньше, чем сам объект. | |
|
18 | /// <code> | |
|
19 | /// { // Level = 1 | |
|
20 | /// "name" : "Peter", // Level = 1 | |
|
21 | /// "address" : { // Level = 2 | |
|
22 | /// city : "Stern" // Level = 2 | |
|
23 | /// } // Level = 1 | |
|
24 | /// } // Level = 0 | |
|
25 | /// </code> | |
|
26 | /// </remarks> | |
|
27 | public class JSONParser : Disposable { | |
|
28 | ||
|
29 | enum MemberContext { | |
|
30 | MemberName, | |
|
31 | MemberValue | |
|
32 | } | |
|
33 | ||
|
34 | #region Parser rules | |
|
35 | struct ParserContext { | |
|
36 | readonly int[,] m_dfa; | |
|
37 | int m_state; | |
|
38 | ||
|
39 | readonly JSONElementContext m_elementContext; | |
|
40 | ||
|
41 | public ParserContext(int[,] dfa, int state, JSONElementContext context) { | |
|
42 | m_dfa = dfa; | |
|
43 | m_state = state; | |
|
44 | m_elementContext = context; | |
|
45 | } | |
|
46 | ||
|
47 | public bool Move(JsonTokenType token) { | |
|
48 | var next = m_dfa[m_state, (int)token]; | |
|
49 | if (next == AutomatonConst.UNREACHABLE_STATE) | |
|
50 | return false; | |
|
51 | m_state = next; | |
|
52 | return true; | |
|
53 | } | |
|
54 | ||
|
55 | public JSONElementContext ElementContext { | |
|
56 | get { return m_elementContext; } | |
|
57 | } | |
|
58 | } | |
|
59 | ||
|
60 | static readonly ParserContext _jsonContext; | |
|
61 | static readonly ParserContext _objectContext; | |
|
62 | static readonly ParserContext _arrayContext; | |
|
63 | ||
|
64 | static JSONParser() { | |
|
65 | ||
|
66 | var valueExpression = MakeToken(JsonTokenType.BeginArray, JsonTokenType.BeginObject, JsonTokenType.Literal, JsonTokenType.Number, JsonTokenType.String); | |
|
67 | var memberExpression = MakeToken(JsonTokenType.String).Cat(MakeToken(JsonTokenType.NameSeparator)).Cat(valueExpression); | |
|
68 | ||
|
69 | var objectExpression = memberExpression | |
|
70 | .Cat( | |
|
71 | MakeToken(JsonTokenType.ValueSeparator) | |
|
72 | .Cat(memberExpression) | |
|
73 | .EClosure() | |
|
74 | ) | |
|
75 | .Optional() | |
|
76 | .Cat(MakeToken(JsonTokenType.EndObject)) | |
|
77 | .End(); | |
|
78 | ||
|
79 | var arrayExpression = valueExpression | |
|
80 | .Cat( | |
|
81 | MakeToken(JsonTokenType.ValueSeparator) | |
|
82 | .Cat(valueExpression) | |
|
83 | .EClosure() | |
|
84 | ) | |
|
85 | .Optional() | |
|
86 | .Cat(MakeToken(JsonTokenType.EndArray)) | |
|
87 | .End(); | |
|
88 | ||
|
89 | var jsonExpression = valueExpression.End(); | |
|
90 | ||
|
91 | _jsonContext = CreateParserContext(jsonExpression, JSONElementContext.None); | |
|
92 | _objectContext = CreateParserContext(objectExpression, JSONElementContext.Object); | |
|
93 | _arrayContext = CreateParserContext(arrayExpression, JSONElementContext.Array); | |
|
94 | } | |
|
95 | ||
|
96 | static Token MakeToken(params JsonTokenType[] input) { | |
|
97 | return Token.New( input.Select(t => (int)t).ToArray() ); | |
|
98 | } | |
|
99 | ||
|
100 | static ParserContext CreateParserContext(Token expr, JSONElementContext context) { | |
|
101 | ||
|
102 | var dfa = new DFATable(); | |
|
103 | var builder = new RegularExpressionVisitor(dfa); | |
|
104 | expr.Accept(builder); | |
|
105 | builder.BuildDFA(); | |
|
106 | ||
|
107 | return new ParserContext(dfa.CreateTransitionTable(), dfa.InitialState, context); | |
|
108 | } | |
|
109 | ||
|
110 | #endregion | |
|
111 | ||
|
112 | readonly JSONScanner m_scanner; | |
|
113 | MemberContext m_memberContext; | |
|
114 | ||
|
115 | JSONElementType m_elementType; | |
|
116 | object m_elementValue; | |
|
117 | string m_memberName = String.Empty; | |
|
118 | ||
|
119 | Stack<ParserContext> m_stack = new Stack<ParserContext>(); | |
|
120 | ParserContext m_context = _jsonContext; | |
|
121 | ||
|
122 | /// <summary> | |
|
123 | /// Создает новый парсер на основе строки, содержащей JSON | |
|
124 | /// </summary> | |
|
125 | /// <param name="text"></param> | |
|
126 | public JSONParser(string text) { | |
|
127 | Safe.ArgumentNotEmpty(text, "text"); | |
|
128 | m_scanner = new JSONScanner(text); | |
|
129 | } | |
|
130 | ||
|
131 | /// <summary> | |
|
132 | /// Создает новый экземпляр парсера, на основе текстового потока. | |
|
133 | /// </summary> | |
|
134 | /// <param name="reader">Текстовый поток.</param> | |
|
135 | public JSONParser(TextReader reader) { | |
|
136 | Safe.ArgumentNotNull(reader, "reader"); | |
|
137 | m_scanner = new JSONScanner(reader); | |
|
138 | } | |
|
139 | ||
|
140 | public int Level { | |
|
141 | get { return m_stack.Count; } | |
|
142 | } | |
|
143 | ||
|
144 | /// <summary> | |
|
145 | /// Тип текущего элемента на котором стоит парсер. | |
|
146 | /// </summary> | |
|
147 | public JSONElementType ElementType { | |
|
148 | get { return m_elementType; } | |
|
149 | } | |
|
150 | ||
|
151 | /// <summary> | |
|
152 | /// Имя элемента - имя свойства родительского контейнера. Для элементов массивов и корневого всегда | |
|
153 | /// пустая строка. | |
|
154 | /// </summary> | |
|
155 | public string ElementName { | |
|
156 | get { return m_memberName; } | |
|
157 | } | |
|
158 | ||
|
159 | /// <summary> | |
|
160 | /// Значение элемента. Только для элементов типа <see cref="JSONElementType.Value"/>, для остальных <c>null</c> | |
|
161 | /// </summary> | |
|
162 | public object ElementValue { | |
|
163 | get { return m_elementValue; } | |
|
164 | } | |
|
165 | ||
|
166 | /// <summary> | |
|
167 | /// Читает слеюудущий объект из потока | |
|
168 | /// </summary> | |
|
169 | /// <returns><c>true</c> - операция чтения прошла успешно, <c>false</c> - конец данных</returns> | |
|
170 | public bool Read() { | |
|
171 | object tokenValue; | |
|
172 | JsonTokenType tokenType; | |
|
173 | ||
|
174 | m_memberName = String.Empty; | |
|
175 | ||
|
176 | while (m_scanner.ReadToken(out tokenValue, out tokenType)) { | |
|
177 | if(!m_context.Move(tokenType)) | |
|
178 | UnexpectedToken(tokenValue, tokenType); | |
|
179 | ||
|
180 | switch (tokenType) { | |
|
181 | case JsonTokenType.BeginObject: | |
|
182 | m_stack.Push(m_context); | |
|
183 | m_context = _objectContext; | |
|
184 | ||
|
185 | m_elementValue = null; | |
|
186 | m_memberContext = MemberContext.MemberName; | |
|
187 | m_elementType = JSONElementType.BeginObject; | |
|
188 | return true; | |
|
189 | case JsonTokenType.EndObject: | |
|
190 | if (m_stack.Count == 0) | |
|
191 | UnexpectedToken(tokenValue, tokenType); | |
|
192 | m_context = m_stack.Pop(); | |
|
193 | ||
|
194 | m_elementValue = null; | |
|
195 | m_elementType = JSONElementType.EndObject; | |
|
196 | return true; | |
|
197 | case JsonTokenType.BeginArray: | |
|
198 | m_stack.Push(m_context); | |
|
199 | m_context = _arrayContext; | |
|
200 | ||
|
201 | m_elementValue = null; | |
|
202 | m_memberContext = MemberContext.MemberValue; | |
|
203 | m_elementType = JSONElementType.BeginArray; | |
|
204 | return true; | |
|
205 | case JsonTokenType.EndArray: | |
|
206 | if (m_stack.Count == 0) | |
|
207 | UnexpectedToken(tokenValue, tokenType); | |
|
208 | m_context = m_stack.Pop(); | |
|
209 | ||
|
210 | m_elementValue = null; | |
|
211 | m_elementType = JSONElementType.EndArray; | |
|
212 | return true; | |
|
213 | case JsonTokenType.String: | |
|
214 | if (m_memberContext == MemberContext.MemberName) { | |
|
215 | m_memberName = (string)tokenValue; | |
|
216 | break; | |
|
217 | } | |
|
218 | m_elementType = JSONElementType.Value; | |
|
219 | m_elementValue = tokenValue; | |
|
220 | return true; | |
|
221 | case JsonTokenType.Number: | |
|
222 | m_elementType = JSONElementType.Value; | |
|
223 | m_elementValue = tokenValue; | |
|
224 | return true; | |
|
225 | case JsonTokenType.Literal: | |
|
226 | m_elementType = JSONElementType.Value; | |
|
227 | m_elementValue = ParseLiteral((string)tokenValue); | |
|
228 | return true; | |
|
229 | case JsonTokenType.NameSeparator: | |
|
230 | m_memberContext = MemberContext.MemberValue; | |
|
231 | break; | |
|
232 | case JsonTokenType.ValueSeparator: | |
|
233 | m_memberContext = m_context.ElementContext == JSONElementContext.Object ? MemberContext.MemberName : MemberContext.MemberValue; | |
|
234 | break; | |
|
235 | default: | |
|
236 | UnexpectedToken(tokenValue, tokenType); | |
|
237 | break; | |
|
238 | } | |
|
239 | } | |
|
240 | if (m_context.ElementContext != JSONElementContext.None) | |
|
241 | throw new ParserException("Unexpedted end of data"); | |
|
242 | ||
|
243 | EOF = true; | |
|
244 | ||
|
245 | return false; | |
|
246 | } | |
|
247 | ||
|
248 | object ParseLiteral(string literal) { | |
|
249 | switch (literal) { | |
|
250 | case "null": | |
|
251 | return null; | |
|
252 | case "false": | |
|
253 | return false; | |
|
254 | case "true": | |
|
255 | return true; | |
|
256 | default: | |
|
257 | UnexpectedToken(literal, JsonTokenType.Literal); | |
|
258 | return null; // avoid compliler error | |
|
259 | } | |
|
260 | } | |
|
261 | ||
|
262 | void UnexpectedToken(object value, JsonTokenType tokenType) { | |
|
263 | throw new ParserException(String.Format("Unexpected token {0}: '{1}'", tokenType, value)); | |
|
264 | } | |
|
265 | ||
|
266 | ||
|
267 | /// <summary> | |
|
268 | /// Признак конца потока | |
|
269 | /// </summary> | |
|
270 | public bool EOF { | |
|
271 | get; | |
|
272 | private set; | |
|
273 | } | |
|
274 | ||
|
275 | protected override void Dispose(bool disposing) { | |
|
276 | if (disposing) | |
|
277 | Safe.Dispose(m_scanner); | |
|
278 | } | |
|
279 | ||
|
280 | /// <summary> | |
|
281 | /// Переходит в конец текущего объекта. | |
|
282 | /// </summary> | |
|
283 | public void SeekElementEnd() { | |
|
284 | var level = Level - 1; | |
|
285 | ||
|
286 | Debug.Assert(level >= 0); | |
|
287 | ||
|
288 | while (Level != level) | |
|
289 | Read(); | |
|
290 | } | |
|
291 | } | |
|
292 | ||
|
293 | } |
@@ -0,0 +1,109 | |||
|
1 | using System; | |
|
2 | using System.Globalization; | |
|
3 | using Implab.Automaton; | |
|
4 | using System.Text; | |
|
5 | using Implab.Components; | |
|
6 | using System.IO; | |
|
7 | ||
|
8 | namespace Implab.Formats.JSON { | |
|
9 | /// <summary> | |
|
10 | /// Сканнер (лексер), разбивающий поток символов на токены JSON. | |
|
11 | /// </summary> | |
|
12 | public class JSONScanner : Disposable { | |
|
13 | readonly StringBuilder m_builder = new StringBuilder(); | |
|
14 | ||
|
15 | readonly ScannerContext<JSONGrammar.TokenType> m_jsonContext = JSONGrammar.Instance.JsonExpression; | |
|
16 | readonly ScannerContext<JSONGrammar.TokenType> m_stringContext = JSONGrammar.Instance.JsonStringExpression; | |
|
17 | ||
|
18 | ||
|
19 | readonly TextScanner m_scanner; | |
|
20 | ||
|
21 | /// <summary> | |
|
22 | /// Создает новый экземпляр сканнера | |
|
23 | /// </summary> | |
|
24 | public JSONScanner(string text) { | |
|
25 | Safe.ArgumentNotEmpty(text, "text"); | |
|
26 | ||
|
27 | m_scanner = new StringScanner(text); | |
|
28 | } | |
|
29 | ||
|
30 | public JSONScanner(TextReader reader, int bufferMax, int chunkSize) { | |
|
31 | Safe.ArgumentNotNull(reader, "reader"); | |
|
32 | ||
|
33 | m_scanner = new ReaderScanner(reader, bufferMax, chunkSize); | |
|
34 | } | |
|
35 | ||
|
36 | public JSONScanner(TextReader reader) : this(reader, 1024*1024, 1024){ | |
|
37 | } | |
|
38 | ||
|
39 | /// <summary> | |
|
40 | /// Читает следующий лексический элемент из входных данных. | |
|
41 | /// </summary> | |
|
42 | /// <param name="tokenValue">Возвращает значение прочитанного токена.</param> | |
|
43 | /// <param name="tokenType">Возвращает тип прочитанного токена.</param> | |
|
44 | /// <returns><c>true</c> - чтение произведено успешно. <c>false</c> - достигнут конец входных данных</returns> | |
|
45 | /// <remarks>В случе если токен не распознается, возникает исключение. Значения токенов обрабатываются, т.е. | |
|
46 | /// в строках обрабатываются экранированные символы, числа становтся типа double.</remarks> | |
|
47 | public bool ReadToken(out object tokenValue, out JsonTokenType tokenType) { | |
|
48 | JSONGrammar.TokenType[] tag; | |
|
49 | while (m_jsonContext.Execute(m_scanner, out tag)) { | |
|
50 | switch (tag[0]) { | |
|
51 | case JSONGrammar.TokenType.StringBound: | |
|
52 | tokenValue = ReadString(); | |
|
53 | tokenType = JsonTokenType.String; | |
|
54 | break; | |
|
55 | case JSONGrammar.TokenType.Number: | |
|
56 | tokenValue = Double.Parse(m_scanner.GetTokenValue(), CultureInfo.InvariantCulture); | |
|
57 | tokenType = JsonTokenType.Number; | |
|
58 | break; | |
|
59 | case JSONGrammar.TokenType.Whitespace: | |
|
60 | continue; | |
|
61 | default: | |
|
62 | tokenType = (JsonTokenType)tag[0]; | |
|
63 | tokenValue = m_scanner.GetTokenValue(); | |
|
64 | break; | |
|
65 | } | |
|
66 | return true; | |
|
67 | } | |
|
68 | tokenValue = null; | |
|
69 | tokenType = JsonTokenType.None; | |
|
70 | return false; | |
|
71 | } | |
|
72 | ||
|
73 | string ReadString() { | |
|
74 | int pos = 0; | |
|
75 | var buf = new char[6]; // the buffer for unescaping chars | |
|
76 | ||
|
77 | JSONGrammar.TokenType[] tag; | |
|
78 | m_builder.Clear(); | |
|
79 | ||
|
80 | while (m_stringContext.Execute(m_scanner, out tag)) { | |
|
81 | switch (tag[0]) { | |
|
82 | case JSONGrammar.TokenType.StringBound: | |
|
83 | return m_builder.ToString(); | |
|
84 | case JSONGrammar.TokenType.UnescapedChar: | |
|
85 | m_scanner.CopyTokenTo(m_builder); | |
|
86 | break; | |
|
87 | case JSONGrammar.TokenType.EscapedUnicode: // \xXXXX - unicode escape sequence | |
|
88 | m_scanner.CopyTokenTo(buf, 0); | |
|
89 | m_builder.Append(StringTranslator.TranslateHexUnicode(buf, 2)); | |
|
90 | pos++; | |
|
91 | break; | |
|
92 | case JSONGrammar.TokenType.EscapedChar: // \t - escape sequence | |
|
93 | m_scanner.CopyTokenTo(buf, 0); | |
|
94 | m_builder.Append(StringTranslator.TranslateEscapedChar(buf[1])); | |
|
95 | break; | |
|
96 | } | |
|
97 | ||
|
98 | } | |
|
99 | ||
|
100 | throw new ParserException("Unexpected end of data"); | |
|
101 | } | |
|
102 | ||
|
103 | protected override void Dispose(bool disposing) { | |
|
104 | if (disposing) | |
|
105 | Safe.Dispose(m_scanner); | |
|
106 | base.Dispose(disposing); | |
|
107 | } | |
|
108 | } | |
|
109 | } |
@@ -0,0 +1,319 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.IO; | |
|
4 | using System.Globalization; | |
|
5 | using System.Diagnostics; | |
|
6 | ||
|
7 | namespace Implab.Formats.JSON { | |
|
8 | public class JSONWriter { | |
|
9 | struct Context { | |
|
10 | public bool needComma; | |
|
11 | public JSONElementContext element; | |
|
12 | } | |
|
13 | Stack<Context> m_contextStack = new Stack<Context>(); | |
|
14 | Context m_context; | |
|
15 | ||
|
16 | const int BUFFER_SIZE = 64; | |
|
17 | ||
|
18 | TextWriter m_writer; | |
|
19 | readonly bool m_indent = true; | |
|
20 | readonly int m_indentSize = 4; | |
|
21 | readonly char[] m_buffer = new char[BUFFER_SIZE]; | |
|
22 | int m_bufferPos; | |
|
23 | ||
|
24 | static readonly char [] _hex = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; | |
|
25 | static readonly char [] _escapeBKS, | |
|
26 | _escapeFWD, | |
|
27 | _escapeCR, | |
|
28 | _escapeNL, | |
|
29 | _escapeTAB, | |
|
30 | _escapeBSLASH, | |
|
31 | _escapeQ; | |
|
32 | ||
|
33 | static JSONWriter() { | |
|
34 | _escapeBKS = "\\b".ToCharArray(); | |
|
35 | _escapeFWD = "\\f".ToCharArray(); | |
|
36 | _escapeCR = "\\r".ToCharArray(); | |
|
37 | _escapeNL = "\\n".ToCharArray(); | |
|
38 | _escapeTAB = "\\t".ToCharArray(); | |
|
39 | _escapeBSLASH = "\\\\".ToCharArray(); | |
|
40 | _escapeQ = "\\\"".ToCharArray(); | |
|
41 | } | |
|
42 | ||
|
43 | public JSONWriter(TextWriter writer) { | |
|
44 | Safe.ArgumentNotNull(writer, "writer"); | |
|
45 | m_writer = writer; | |
|
46 | } | |
|
47 | ||
|
48 | public JSONWriter(TextWriter writer, bool indent) { | |
|
49 | Safe.ArgumentNotNull(writer, "writer"); | |
|
50 | ||
|
51 | m_writer = writer; | |
|
52 | m_indent = indent; | |
|
53 | } | |
|
54 | ||
|
55 | void WriteIndent() { | |
|
56 | if (m_indent) { | |
|
57 | var indent = new char[m_contextStack.Count * m_indentSize + 1]; | |
|
58 | indent[0] = '\n'; | |
|
59 | for (int i = 1; i < indent.Length; i++) | |
|
60 | indent[i] = ' '; | |
|
61 | m_writer.Write(new String(indent)); | |
|
62 | } else { | |
|
63 | m_writer.Write(' '); | |
|
64 | } | |
|
65 | } | |
|
66 | ||
|
67 | void WriteMemberName(string name) { | |
|
68 | Safe.ArgumentNotEmpty(name, "name"); | |
|
69 | if (m_context.element != JSONElementContext.Object) | |
|
70 | OperationNotApplicable("WriteMember"); | |
|
71 | if (m_context.needComma) | |
|
72 | m_writer.Write(","); | |
|
73 | ||
|
74 | WriteIndent(); | |
|
75 | m_context.needComma = true; | |
|
76 | Write(name); | |
|
77 | m_writer.Write(" : "); | |
|
78 | } | |
|
79 | ||
|
80 | public void WriteValue(string name, string value) { | |
|
81 | WriteMemberName(name); | |
|
82 | Write(value); | |
|
83 | } | |
|
84 | ||
|
85 | public void WriteValue(string name, bool value) { | |
|
86 | WriteMemberName(name); | |
|
87 | Write(value); | |
|
88 | } | |
|
89 | ||
|
90 | public void WriteValue(string name, double value) { | |
|
91 | WriteMemberName(name); | |
|
92 | Write(value); | |
|
93 | } | |
|
94 | ||
|
95 | public void WriteValue(string value) { | |
|
96 | if (m_context.element == JSONElementContext.Array) { | |
|
97 | ||
|
98 | if (m_context.needComma) | |
|
99 | m_writer.Write(","); | |
|
100 | WriteIndent(); | |
|
101 | m_context.needComma = true; | |
|
102 | ||
|
103 | Write(value); | |
|
104 | } else if (m_context.element == JSONElementContext.None) { | |
|
105 | Write(value); | |
|
106 | m_context.element = JSONElementContext.Closed; | |
|
107 | } else { | |
|
108 | OperationNotApplicable("WriteValue"); | |
|
109 | } | |
|
110 | } | |
|
111 | ||
|
112 | public void WriteValue(bool value) { | |
|
113 | if (m_context.element == JSONElementContext.Array) { | |
|
114 | ||
|
115 | if (m_context.needComma) | |
|
116 | m_writer.Write(","); | |
|
117 | WriteIndent(); | |
|
118 | m_context.needComma = true; | |
|
119 | ||
|
120 | Write(value); | |
|
121 | } else if (m_context.element == JSONElementContext.None) { | |
|
122 | Write(value); | |
|
123 | m_context.element = JSONElementContext.Closed; | |
|
124 | } else { | |
|
125 | OperationNotApplicable("WriteValue"); | |
|
126 | } | |
|
127 | } | |
|
128 | ||
|
129 | public void WriteValue(double value) { | |
|
130 | if (m_context.element == JSONElementContext.Array) { | |
|
131 | ||
|
132 | if (m_context.needComma) | |
|
133 | m_writer.Write(","); | |
|
134 | WriteIndent(); | |
|
135 | m_context.needComma = true; | |
|
136 | ||
|
137 | Write(value); | |
|
138 | } else if (m_context.element == JSONElementContext.None) { | |
|
139 | Write(value); | |
|
140 | m_context.element = JSONElementContext.Closed; | |
|
141 | } else { | |
|
142 | OperationNotApplicable("WriteValue"); | |
|
143 | } | |
|
144 | } | |
|
145 | ||
|
146 | public void BeginObject() { | |
|
147 | if (m_context.element != JSONElementContext.None && m_context.element != JSONElementContext.Array) | |
|
148 | OperationNotApplicable("BeginObject"); | |
|
149 | if (m_context.needComma) | |
|
150 | m_writer.Write(","); | |
|
151 | ||
|
152 | WriteIndent(); | |
|
153 | ||
|
154 | m_context.needComma = true; | |
|
155 | ||
|
156 | m_contextStack.Push(m_context); | |
|
157 | ||
|
158 | m_context = new Context { element = JSONElementContext.Object, needComma = false }; | |
|
159 | m_writer.Write("{"); | |
|
160 | } | |
|
161 | ||
|
162 | public void BeginObject(string name) { | |
|
163 | WriteMemberName(name); | |
|
164 | ||
|
165 | m_contextStack.Push(m_context); | |
|
166 | ||
|
167 | m_context = new Context { element = JSONElementContext.Object, needComma = false }; | |
|
168 | m_writer.Write("{"); | |
|
169 | } | |
|
170 | ||
|
171 | public void EndObject() { | |
|
172 | if (m_context.element != JSONElementContext.Object) | |
|
173 | OperationNotApplicable("EndObject"); | |
|
174 | ||
|
175 | m_context = m_contextStack.Pop(); | |
|
176 | if (m_contextStack.Count == 0) | |
|
177 | m_context.element = JSONElementContext.Closed; | |
|
178 | WriteIndent(); | |
|
179 | m_writer.Write("}"); | |
|
180 | } | |
|
181 | ||
|
182 | public void BeginArray() { | |
|
183 | if (m_context.element != JSONElementContext.None && m_context.element != JSONElementContext.Array) | |
|
184 | throw new InvalidOperationException(); | |
|
185 | if (m_context.needComma) { | |
|
186 | m_writer.Write(","); | |
|
187 | ||
|
188 | } | |
|
189 | m_context.needComma = true; | |
|
190 | ||
|
191 | WriteIndent(); | |
|
192 | m_contextStack.Push(m_context); | |
|
193 | m_context = new Context { element = JSONElementContext.Array, needComma = false }; | |
|
194 | m_writer.Write("["); | |
|
195 | } | |
|
196 | ||
|
197 | public void BeginArray(string name) { | |
|
198 | WriteMemberName(name); | |
|
199 | ||
|
200 | m_contextStack.Push(m_context); | |
|
201 | ||
|
202 | m_context = new Context { element = JSONElementContext.Array, needComma = false }; | |
|
203 | m_writer.Write("["); | |
|
204 | } | |
|
205 | ||
|
206 | public void EndArray() { | |
|
207 | if (m_context.element != JSONElementContext.Array) | |
|
208 | OperationNotApplicable("EndArray"); | |
|
209 | ||
|
210 | m_context = m_contextStack.Pop(); | |
|
211 | if (m_contextStack.Count == 0) | |
|
212 | m_context.element = JSONElementContext.Closed; | |
|
213 | WriteIndent(); | |
|
214 | m_writer.Write("]"); | |
|
215 | } | |
|
216 | ||
|
217 | void Write(bool value) { | |
|
218 | m_writer.Write(value ? "true" : "false"); | |
|
219 | } | |
|
220 | ||
|
221 | void FlushBuffer() { | |
|
222 | if (m_bufferPos > 0) { | |
|
223 | m_writer.Write(m_buffer, 0, m_bufferPos); | |
|
224 | m_bufferPos = 0; | |
|
225 | } | |
|
226 | } | |
|
227 | ||
|
228 | void Write(string value) { | |
|
229 | if (value == null) { | |
|
230 | m_writer.Write("null"); | |
|
231 | return; | |
|
232 | } | |
|
233 | ||
|
234 | Debug.Assert(m_bufferPos == 0); | |
|
235 | ||
|
236 | var chars = value.ToCharArray(); | |
|
237 | m_buffer[m_bufferPos++] = '"'; | |
|
238 | ||
|
239 | // Analysis disable once ForCanBeConvertedToForeach | |
|
240 | for (int i = 0; i < chars.Length; i++) { | |
|
241 | var ch = chars[i]; | |
|
242 | ||
|
243 | char[] escapeSeq; | |
|
244 | ||
|
245 | switch (ch) { | |
|
246 | case '\b': | |
|
247 | escapeSeq = _escapeBKS; | |
|
248 | break; | |
|
249 | case '\f': | |
|
250 | escapeSeq = _escapeFWD; | |
|
251 | break; | |
|
252 | case '\r': | |
|
253 | escapeSeq = _escapeCR; | |
|
254 | break; | |
|
255 | case '\n': | |
|
256 | escapeSeq = _escapeNL; | |
|
257 | break; | |
|
258 | case '\t': | |
|
259 | escapeSeq = _escapeTAB; | |
|
260 | break; | |
|
261 | case '\\': | |
|
262 | escapeSeq = _escapeBSLASH; | |
|
263 | break; | |
|
264 | case '"': | |
|
265 | escapeSeq = _escapeQ; | |
|
266 | break; | |
|
267 | default: | |
|
268 | if (ch < 0x20) { | |
|
269 | if (m_bufferPos + 6 > BUFFER_SIZE) | |
|
270 | FlushBuffer(); | |
|
271 | ||
|
272 | m_buffer[m_bufferPos++] = '\\'; | |
|
273 | m_buffer[m_bufferPos++] = 'u'; | |
|
274 | m_buffer[m_bufferPos++] = '0'; | |
|
275 | m_buffer[m_bufferPos++] = '0'; | |
|
276 | m_buffer[m_bufferPos++] = _hex[ch >> 4 & 0xf]; | |
|
277 | m_buffer[m_bufferPos++] = _hex[ch & 0xf]; | |
|
278 | ||
|
279 | } else { | |
|
280 | if (m_bufferPos >= BUFFER_SIZE) | |
|
281 | FlushBuffer(); | |
|
282 | m_buffer[m_bufferPos++] = ch; | |
|
283 | } | |
|
284 | continue; | |
|
285 | } | |
|
286 | ||
|
287 | if (m_bufferPos + escapeSeq.Length > BUFFER_SIZE) | |
|
288 | FlushBuffer(); | |
|
289 | ||
|
290 | Array.Copy(escapeSeq, 0, m_buffer, m_bufferPos, escapeSeq.Length); | |
|
291 | m_bufferPos += escapeSeq.Length; | |
|
292 | ||
|
293 | } | |
|
294 | ||
|
295 | if (m_bufferPos >= BUFFER_SIZE) | |
|
296 | FlushBuffer(); | |
|
297 | ||
|
298 | m_buffer[m_bufferPos++] = '"'; | |
|
299 | ||
|
300 | FlushBuffer(); | |
|
301 | } | |
|
302 | ||
|
303 | void Write(double value) { | |
|
304 | if (double.IsNaN(value)) | |
|
305 | Write("NaN"); | |
|
306 | else if (double.IsNegativeInfinity(value)) | |
|
307 | Write("-Infinity"); | |
|
308 | else if (double.IsPositiveInfinity(value)) | |
|
309 | Write("Infinity"); | |
|
310 | else | |
|
311 | m_writer.Write(value.ToString(CultureInfo.InvariantCulture)); | |
|
312 | } | |
|
313 | ||
|
314 | void OperationNotApplicable(string opName) { | |
|
315 | throw new InvalidOperationException(String.Format("The operation '{0}' isn't applicable in the context of '{1}'", opName, m_context.element )); | |
|
316 | } | |
|
317 | ||
|
318 | } | |
|
319 | } |
@@ -0,0 +1,335 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Globalization; | |
|
5 | using System.IO; | |
|
6 | using System.Xml; | |
|
7 | ||
|
8 | namespace Implab.Formats.JSON { | |
|
9 | public class JSONXmlReader : XmlReader { | |
|
10 | ||
|
11 | enum ValueContext { | |
|
12 | Undefined, | |
|
13 | ElementStart, | |
|
14 | ElementValue, | |
|
15 | ElementEnd, | |
|
16 | ElementEmpty | |
|
17 | } | |
|
18 | ||
|
19 | struct LocalNameContext { | |
|
20 | public string localName; | |
|
21 | public bool isArray; | |
|
22 | } | |
|
23 | ||
|
24 | JSONParser m_parser; | |
|
25 | ValueContext m_valueContext; | |
|
26 | ReadState m_state = ReadState.Initial; | |
|
27 | Stack<LocalNameContext> m_localNameStack = new Stack<LocalNameContext>(); | |
|
28 | LocalNameContext m_localName; | |
|
29 | int m_depthCorrection; | |
|
30 | ||
|
31 | readonly string m_rootName; | |
|
32 | readonly string m_prefix; | |
|
33 | readonly string m_namespaceUri; | |
|
34 | readonly bool m_flattenArrays; | |
|
35 | readonly string m_arrayItemName; | |
|
36 | readonly XmlNameTable m_nameTable; | |
|
37 | ||
|
38 | JSONXmlReader(JSONParser parser, JSONXmlReaderOptions options) { | |
|
39 | m_parser = parser; | |
|
40 | ||
|
41 | if (options != null) { | |
|
42 | m_prefix = options.NodesPrefix ?? String.Empty; | |
|
43 | m_namespaceUri = options.NamespaceURI ?? String.Empty; | |
|
44 | m_rootName = options.RootName ?? "json"; | |
|
45 | m_flattenArrays = options.FlattenArrays; | |
|
46 | m_arrayItemName = options.ArrayItemName ?? "item"; | |
|
47 | m_nameTable = options.NameTable ?? new NameTable(); | |
|
48 | } else { | |
|
49 | m_prefix = String.Empty; | |
|
50 | m_namespaceUri = String.Empty; | |
|
51 | m_rootName = "json"; | |
|
52 | m_flattenArrays = false; | |
|
53 | m_arrayItemName = "item"; | |
|
54 | m_nameTable = new NameTable(); | |
|
55 | } | |
|
56 | } | |
|
57 | ||
|
58 | /// <summary> | |
|
59 | /// Always 0, JSON doesn't support attributes | |
|
60 | /// </summary> | |
|
61 | public override int AttributeCount { | |
|
62 | get { return 0; } | |
|
63 | } | |
|
64 | ||
|
65 | public override string BaseURI { | |
|
66 | get { return String.Empty; } | |
|
67 | } | |
|
68 | ||
|
69 | public override int Depth { | |
|
70 | get { | |
|
71 | return m_localNameStack.Count + m_depthCorrection; | |
|
72 | } | |
|
73 | } | |
|
74 | ||
|
75 | public override bool EOF { | |
|
76 | get { return m_parser.EOF; } | |
|
77 | } | |
|
78 | ||
|
79 | /// <summary> | |
|
80 | /// Always throws an exception | |
|
81 | /// </summary> | |
|
82 | /// <param name="i"></param> | |
|
83 | /// <returns></returns> | |
|
84 | public override string GetAttribute(int i) { | |
|
85 | throw new ArgumentOutOfRangeException(); | |
|
86 | } | |
|
87 | ||
|
88 | /// <summary> | |
|
89 | /// Always returns empty string | |
|
90 | /// </summary> | |
|
91 | /// <param name="name"></param> | |
|
92 | /// <param name="namespaceURI"></param> | |
|
93 | /// <returns></returns> | |
|
94 | public override string GetAttribute(string name, string namespaceURI) { | |
|
95 | return String.Empty; | |
|
96 | } | |
|
97 | ||
|
98 | /// <summary> | |
|
99 | /// Always returns empty string | |
|
100 | /// </summary> | |
|
101 | /// <param name="name"></param> | |
|
102 | /// <returns></returns> | |
|
103 | public override string GetAttribute(string name) { | |
|
104 | return String.Empty; | |
|
105 | } | |
|
106 | ||
|
107 | public override bool IsEmptyElement { | |
|
108 | get { return m_parser.ElementType == JSONElementType.Value && m_valueContext == ValueContext.ElementEmpty; } | |
|
109 | } | |
|
110 | ||
|
111 | public override string LocalName { | |
|
112 | get { return m_localName.localName; } | |
|
113 | } | |
|
114 | ||
|
115 | public override string LookupNamespace(string prefix) { | |
|
116 | if (String.IsNullOrEmpty(prefix) || prefix == m_prefix) | |
|
117 | return m_namespaceUri; | |
|
118 | ||
|
119 | return String.Empty; | |
|
120 | } | |
|
121 | ||
|
122 | public override bool MoveToAttribute(string name, string ns) { | |
|
123 | return false; | |
|
124 | } | |
|
125 | ||
|
126 | public override bool MoveToAttribute(string name) { | |
|
127 | return false; | |
|
128 | } | |
|
129 | ||
|
130 | public override bool MoveToElement() { | |
|
131 | return false; | |
|
132 | } | |
|
133 | ||
|
134 | public override bool MoveToFirstAttribute() { | |
|
135 | return false; | |
|
136 | } | |
|
137 | ||
|
138 | public override bool MoveToNextAttribute() { | |
|
139 | return false; | |
|
140 | } | |
|
141 | ||
|
142 | public override XmlNameTable NameTable { | |
|
143 | get { return m_nameTable; } | |
|
144 | } | |
|
145 | ||
|
146 | public override string NamespaceURI { | |
|
147 | get { return m_namespaceUri; } | |
|
148 | } | |
|
149 | ||
|
150 | public override XmlNodeType NodeType { | |
|
151 | get { | |
|
152 | switch (m_parser.ElementType) { | |
|
153 | case JSONElementType.BeginObject: | |
|
154 | case JSONElementType.BeginArray: | |
|
155 | return XmlNodeType.Element; | |
|
156 | case JSONElementType.EndObject: | |
|
157 | case JSONElementType.EndArray: | |
|
158 | return XmlNodeType.EndElement; | |
|
159 | case JSONElementType.Value: | |
|
160 | switch (m_valueContext) { | |
|
161 | case ValueContext.ElementStart: | |
|
162 | case ValueContext.ElementEmpty: | |
|
163 | return XmlNodeType.Element; | |
|
164 | case ValueContext.ElementValue: | |
|
165 | return XmlNodeType.Text; | |
|
166 | case ValueContext.ElementEnd: | |
|
167 | return XmlNodeType.EndElement; | |
|
168 | default: | |
|
169 | throw new InvalidOperationException(); | |
|
170 | } | |
|
171 | default: | |
|
172 | throw new InvalidOperationException(); | |
|
173 | } | |
|
174 | } | |
|
175 | } | |
|
176 | ||
|
177 | public override string Prefix { | |
|
178 | get { return m_prefix; } | |
|
179 | } | |
|
180 | ||
|
181 | public override bool Read() { | |
|
182 | if (m_state != ReadState.Interactive && m_state != ReadState.Initial) | |
|
183 | return false; | |
|
184 | ||
|
185 | if (m_state == ReadState.Initial) | |
|
186 | m_state = ReadState.Interactive; | |
|
187 | ||
|
188 | try { | |
|
189 | switch (m_parser.ElementType) { | |
|
190 | case JSONElementType.Value: | |
|
191 | switch (m_valueContext) { | |
|
192 | case ValueContext.ElementStart: | |
|
193 | SetLocalName(String.Empty); | |
|
194 | m_valueContext = ValueContext.ElementValue; | |
|
195 | return true; | |
|
196 | case ValueContext.ElementValue: | |
|
197 | RestoreLocalName(); | |
|
198 | m_valueContext = ValueContext.ElementEnd; | |
|
199 | return true; | |
|
200 | case ValueContext.ElementEmpty: | |
|
201 | case ValueContext.ElementEnd: | |
|
202 | RestoreLocalName(); | |
|
203 | break; | |
|
204 | } | |
|
205 | break; | |
|
206 | case JSONElementType.EndArray: | |
|
207 | case JSONElementType.EndObject: | |
|
208 | RestoreLocalName(); | |
|
209 | break; | |
|
210 | } | |
|
211 | string itemName = m_parser.ElementType == JSONElementType.None ? m_rootName : m_flattenArrays ? m_localName.localName : m_arrayItemName; | |
|
212 | while (m_parser.Read()) { | |
|
213 | if (!String.IsNullOrEmpty(m_parser.ElementName)) | |
|
214 | itemName = m_parser.ElementName; | |
|
215 | ||
|
216 | switch (m_parser.ElementType) { | |
|
217 | case JSONElementType.BeginArray: | |
|
218 | if (m_flattenArrays && !m_localName.isArray) { | |
|
219 | m_depthCorrection--; | |
|
220 | SetLocalName(itemName, true); | |
|
221 | continue; | |
|
222 | } | |
|
223 | SetLocalName(itemName, true); | |
|
224 | break; | |
|
225 | case JSONElementType.BeginObject: | |
|
226 | SetLocalName(itemName); | |
|
227 | break; | |
|
228 | case JSONElementType.EndArray: | |
|
229 | if (m_flattenArrays && !m_localNameStack.Peek().isArray) { | |
|
230 | RestoreLocalName(); | |
|
231 | m_depthCorrection++; | |
|
232 | continue; | |
|
233 | } | |
|
234 | break; | |
|
235 | case JSONElementType.EndObject: | |
|
236 | break; | |
|
237 | case JSONElementType.Value: | |
|
238 | SetLocalName(itemName); | |
|
239 | m_valueContext = m_parser.ElementValue == null ? ValueContext.ElementEmpty : ValueContext.ElementStart; | |
|
240 | break; | |
|
241 | } | |
|
242 | return true; | |
|
243 | } | |
|
244 | ||
|
245 | m_state = ReadState.EndOfFile; | |
|
246 | return false; | |
|
247 | } catch { | |
|
248 | m_state = ReadState.Error; | |
|
249 | throw; | |
|
250 | } | |
|
251 | } | |
|
252 | ||
|
253 | public override bool ReadAttributeValue() { | |
|
254 | return false; | |
|
255 | } | |
|
256 | ||
|
257 | public override ReadState ReadState { | |
|
258 | get { return m_state; } | |
|
259 | } | |
|
260 | ||
|
261 | public override void ResolveEntity() { | |
|
262 | // do nothing | |
|
263 | } | |
|
264 | ||
|
265 | public override string Value { | |
|
266 | get { | |
|
267 | if (m_parser.ElementValue == null) | |
|
268 | return String.Empty; | |
|
269 | if (Convert.GetTypeCode(m_parser.ElementValue) == TypeCode.Double) | |
|
270 | return ((double)m_parser.ElementValue).ToString(CultureInfo.InvariantCulture); | |
|
271 | return m_parser.ElementValue.ToString(); | |
|
272 | } | |
|
273 | } | |
|
274 | ||
|
275 | void SetLocalName(string name) { | |
|
276 | m_localNameStack.Push(m_localName); | |
|
277 | m_localName.localName = name; | |
|
278 | m_localName.isArray = false; | |
|
279 | } | |
|
280 | ||
|
281 | void SetLocalName(string name, bool isArray) { | |
|
282 | m_localNameStack.Push(m_localName); | |
|
283 | m_localName.localName = name; | |
|
284 | m_localName.isArray = isArray; | |
|
285 | } | |
|
286 | ||
|
287 | void RestoreLocalName() { | |
|
288 | m_localName = m_localNameStack.Pop(); | |
|
289 | } | |
|
290 | ||
|
291 | public override void Close() { | |
|
292 | ||
|
293 | } | |
|
294 | ||
|
295 | protected override void Dispose(bool disposing) { | |
|
296 | #if MONO | |
|
297 | disposing = true; | |
|
298 | #endif | |
|
299 | if (disposing) { | |
|
300 | m_parser.Dispose(); | |
|
301 | } | |
|
302 | base.Dispose(disposing); | |
|
303 | } | |
|
304 | ||
|
305 | public static JSONXmlReader Create(string file, JSONXmlReaderOptions options) { | |
|
306 | return Create(File.OpenText(file), options); | |
|
307 | } | |
|
308 | ||
|
309 | /// <summary> | |
|
310 | /// Creates the XmlReader for the specified text stream with JSON data. | |
|
311 | /// </summary> | |
|
312 | /// <param name="reader">Text reader.</param> | |
|
313 | /// <param name="options">Options.</param> | |
|
314 | /// <remarks> | |
|
315 | /// The reader will be disposed when the XmlReader is disposed. | |
|
316 | /// </remarks> | |
|
317 | public static JSONXmlReader Create(TextReader reader, JSONXmlReaderOptions options) { | |
|
318 | return new JSONXmlReader(new JSONParser(reader), options); | |
|
319 | } | |
|
320 | ||
|
321 | /// <summary> | |
|
322 | /// Creates the XmlReader for the specified stream with JSON data. | |
|
323 | /// </summary> | |
|
324 | /// <param name="stream">Stream.</param> | |
|
325 | /// <param name="options">Options.</param> | |
|
326 | /// <remarks> | |
|
327 | /// The stream will be disposed when the XmlReader is disposed. | |
|
328 | /// </remarks> | |
|
329 | public static JSONXmlReader Create(Stream stream, JSONXmlReaderOptions options) { | |
|
330 | Safe.ArgumentNotNull(stream, "stream"); | |
|
331 | // HACK don't dispose StreaReader to keep stream opened | |
|
332 | return Create(new StreamReader(stream), options); | |
|
333 | } | |
|
334 | } | |
|
335 | } |
@@ -0,0 +1,62 | |||
|
1 | ||
|
2 | using System.Xml; | |
|
3 | ||
|
4 | namespace Implab.Formats.JSON { | |
|
5 | /// <summary> | |
|
6 | /// Набор необязательных параметров для <see cref="JSONXmlReader"/>, позволяющий управлять процессом | |
|
7 | /// интерпретации <c>JSON</c> документа. | |
|
8 | /// </summary> | |
|
9 | public class JSONXmlReaderOptions { | |
|
10 | /// <summary> | |
|
11 | /// Пространство имен в котором будут располагаться читаемые элементы документа | |
|
12 | /// </summary> | |
|
13 | public string NamespaceURI { | |
|
14 | get; | |
|
15 | set; | |
|
16 | } | |
|
17 | ||
|
18 | /// <summary> | |
|
19 | /// Интерпретировать массивы как множественные элементы (убирает один уровень вложенности), иначе массив | |
|
20 | /// представляется в виде узла, дочерними элементами которого являются элементы массива, имена дочерних элементов | |
|
21 | /// определяются свойством <see cref="ArrayItemName"/>. По умолчанию <c>false</c>. | |
|
22 | /// </summary> | |
|
23 | public bool FlattenArrays { | |
|
24 | get; | |
|
25 | set; | |
|
26 | } | |
|
27 | ||
|
28 | /// <summary> | |
|
29 | /// Префикс, для узлов документа | |
|
30 | /// </summary> | |
|
31 | public string NodesPrefix { | |
|
32 | get; | |
|
33 | set; | |
|
34 | } | |
|
35 | ||
|
36 | /// <summary> | |
|
37 | /// Имя корневого элемента в xml документе | |
|
38 | /// </summary> | |
|
39 | public string RootName { | |
|
40 | get; | |
|
41 | set; | |
|
42 | } | |
|
43 | ||
|
44 | /// <summary> | |
|
45 | /// Имя элемента для массивов, если не включена опция <see cref="FlattenArrays"/>. | |
|
46 | /// По умолчанию <c>item</c>. | |
|
47 | /// </summary> | |
|
48 | public string ArrayItemName { | |
|
49 | get; | |
|
50 | set; | |
|
51 | } | |
|
52 | ||
|
53 | /// <summary> | |
|
54 | /// Таблица атомизированных строк для построения документа. | |
|
55 | /// </summary> | |
|
56 | public XmlNameTable NameTable { | |
|
57 | get; | |
|
58 | set; | |
|
59 | } | |
|
60 | ||
|
61 | } | |
|
62 | } |
@@ -0,0 +1,44 | |||
|
1 | namespace Implab.Formats.JSON { | |
|
2 | /// <summary> | |
|
3 | /// Тип токенов, возвращаемых <see cref="JSONScanner"/>. | |
|
4 | /// </summary> | |
|
5 | public enum JsonTokenType : int { | |
|
6 | None = 0, | |
|
7 | /// <summary> | |
|
8 | /// Начало объекта | |
|
9 | /// </summary> | |
|
10 | BeginObject, | |
|
11 | /// <summary> | |
|
12 | /// Конец объекта | |
|
13 | /// </summary> | |
|
14 | EndObject, | |
|
15 | /// <summary> | |
|
16 | /// Начало массива | |
|
17 | /// </summary> | |
|
18 | BeginArray, | |
|
19 | /// <summary> | |
|
20 | /// Конец массива | |
|
21 | /// </summary> | |
|
22 | EndArray, | |
|
23 | /// <summary> | |
|
24 | /// Строка | |
|
25 | /// </summary> | |
|
26 | String, | |
|
27 | /// <summary> | |
|
28 | /// Число | |
|
29 | /// </summary> | |
|
30 | Number, | |
|
31 | /// <summary> | |
|
32 | /// Литерал | |
|
33 | /// </summary> | |
|
34 | Literal, | |
|
35 | /// <summary> | |
|
36 | /// Разделитель имени <c>:</c> | |
|
37 | /// </summary> | |
|
38 | NameSeparator, | |
|
39 | /// <summary> | |
|
40 | /// Разделитель имени <c>,</c> | |
|
41 | /// </summary> | |
|
42 | ValueSeparator | |
|
43 | } | |
|
44 | } |
@@ -0,0 +1,52 | |||
|
1 | using Implab; | |
|
2 | using Implab.Formats; | |
|
3 | using System; | |
|
4 | using System.Collections.Generic; | |
|
5 | using System.Diagnostics; | |
|
6 | using System.Linq; | |
|
7 | using System.Text; | |
|
8 | using System.Threading.Tasks; | |
|
9 | ||
|
10 | namespace Implab.Formats.JSON { | |
|
11 | /// <summary> | |
|
12 | /// Класс для преобразования экранированной строки JSON | |
|
13 | /// </summary> | |
|
14 | static class StringTranslator { | |
|
15 | static readonly char[] _escMap; | |
|
16 | static readonly int[] _hexMap; | |
|
17 | ||
|
18 | static StringTranslator() { | |
|
19 | var chars = new char[] { 'b', 'f', 't', 'r', 'n', '\\', '/' }; | |
|
20 | var vals = new char[] { '\b', '\f', '\t', '\r', '\n', '\\', '/' }; | |
|
21 | ||
|
22 | _escMap = new char[chars.Max() + 1]; | |
|
23 | ||
|
24 | for (int i = 0; i < chars.Length; i++) | |
|
25 | _escMap[chars[i]] = vals[i]; | |
|
26 | ||
|
27 | var hexs = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F' }; | |
|
28 | var ints = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10, 11, 12, 13, 14, 15 }; | |
|
29 | ||
|
30 | _hexMap = new int[hexs.Max() + 1]; | |
|
31 | ||
|
32 | for (int i = 0; i < hexs.Length; i++) | |
|
33 | _hexMap[hexs[i]] = ints[i]; | |
|
34 | ||
|
35 | } | |
|
36 | ||
|
37 | internal static char TranslateEscapedChar(char symbol) { | |
|
38 | return _escMap[symbol]; | |
|
39 | } | |
|
40 | ||
|
41 | internal static char TranslateHexUnicode(char[] symbols, int offset) { | |
|
42 | Debug.Assert(symbols != null); | |
|
43 | Debug.Assert(symbols.Length - offset >= 4); | |
|
44 | ||
|
45 | int value = (_hexMap[symbols[offset]] << 12) | |
|
46 | | (_hexMap[symbols[offset + 1]] << 8) | |
|
47 | | (_hexMap[symbols[offset + 2]] << 4) | |
|
48 | | (_hexMap[symbols[offset + 3]]); | |
|
49 | return (char)value; | |
|
50 | } | |
|
51 | } | |
|
52 | } |
@@ -0,0 +1,30 | |||
|
1 | using System; | |
|
2 | using System.IO; | |
|
3 | ||
|
4 | namespace Implab.Formats { | |
|
5 | public class ReaderScanner: TextScanner { | |
|
6 | const int CHUNK_SIZE = 1024*4; | |
|
7 | const int BUFFER_MAX = CHUNK_SIZE*1024; | |
|
8 | ||
|
9 | readonly TextReader m_reader; | |
|
10 | ||
|
11 | public ReaderScanner(TextReader reader, int limit, int chunk) : base(limit, chunk) { | |
|
12 | Safe.ArgumentNotNull(reader, "reader"); | |
|
13 | m_reader = reader; | |
|
14 | } | |
|
15 | ||
|
16 | public ReaderScanner(TextReader reader) : this(reader, BUFFER_MAX, CHUNK_SIZE) { | |
|
17 | } | |
|
18 | ||
|
19 | protected override int Read(char[] buffer, int offset, int size) { | |
|
20 | return m_reader.Read(buffer, offset, size); | |
|
21 | } | |
|
22 | ||
|
23 | protected override void Dispose(bool disposing) { | |
|
24 | if (disposing) | |
|
25 | Safe.Dispose(m_reader); | |
|
26 | base.Dispose(disposing); | |
|
27 | } | |
|
28 | } | |
|
29 | } | |
|
30 |
@@ -0,0 +1,30 | |||
|
1 | namespace Implab.Formats { | |
|
2 | /// <summary> | |
|
3 | /// Represents a scanner configuration usefull to recongnize token, based on the DFA. | |
|
4 | /// </summary> | |
|
5 | public class ScannerContext<TTag> { | |
|
6 | ||
|
7 | public int[,] Dfa { get; private set; } | |
|
8 | ||
|
9 | public bool[] Final { get; private set; } | |
|
10 | ||
|
11 | public TTag[][] Tags { get; private set; } | |
|
12 | ||
|
13 | public int State { get; private set; } | |
|
14 | ||
|
15 | public int[] Alphabet { get; private set; } | |
|
16 | ||
|
17 | public ScannerContext(int[,] dfa, bool[] final, TTag[][] tags, int state, int[] alphabet) { | |
|
18 | Dfa = dfa; | |
|
19 | Final = final; | |
|
20 | Tags = tags; | |
|
21 | State = state; | |
|
22 | Alphabet = alphabet; | |
|
23 | } | |
|
24 | ||
|
25 | public bool Execute(TextScanner scanner, out TTag[] tag) { | |
|
26 | return scanner.ReadToken(Dfa, Final, Tags, State, Alphabet, out tag); | |
|
27 | } | |
|
28 | } | |
|
29 | } | |
|
30 |
@@ -0,0 +1,18 | |||
|
1 | using System; | |
|
2 | ||
|
3 | namespace Implab.Formats { | |
|
4 | public class StringScanner: TextScanner { | |
|
5 | const int CHUNK_SIZE = 1024; | |
|
6 | ||
|
7 | public StringScanner(string text) : base(null) { | |
|
8 | Safe.ArgumentNotNull(text, "text"); | |
|
9 | var data = text.ToCharArray(); | |
|
10 | Feed(data, 0, data.Length); | |
|
11 | } | |
|
12 | ||
|
13 | protected override int Read(char[] buffer, int offset, int size) { | |
|
14 | return 0; | |
|
15 | } | |
|
16 | } | |
|
17 | } | |
|
18 |
@@ -0,0 +1,157 | |||
|
1 | using System; | |
|
2 | using Implab.Components; | |
|
3 | using System.Diagnostics; | |
|
4 | using Implab.Automaton; | |
|
5 | using System.Text; | |
|
6 | ||
|
7 | namespace Implab.Formats { | |
|
8 | public abstract class TextScanner : Disposable { | |
|
9 | readonly int m_bufferMax; | |
|
10 | readonly int m_chunkSize; | |
|
11 | ||
|
12 | char[] m_buffer; | |
|
13 | int m_bufferOffset; | |
|
14 | int m_bufferSize; | |
|
15 | int m_tokenOffset; | |
|
16 | int m_tokenLength; | |
|
17 | ||
|
18 | /// <summary> | |
|
19 | /// Initializes a new instance of the <see cref="Implab.Formats.TextScanner"/> class. | |
|
20 | /// </summary> | |
|
21 | /// <param name="bufferMax">Buffer max.</param> | |
|
22 | /// <param name="chunkSize">Chunk size.</param> | |
|
23 | protected TextScanner(int bufferMax, int chunkSize) { | |
|
24 | Debug.Assert(m_chunkSize <= m_bufferMax); | |
|
25 | ||
|
26 | m_bufferMax = bufferMax; | |
|
27 | m_chunkSize = chunkSize; | |
|
28 | } | |
|
29 | ||
|
30 | /// <summary> | |
|
31 | /// Initializes a new instance of the <see cref="Implab.Formats.TextScanner"/> class. | |
|
32 | /// </summary> | |
|
33 | /// <param name="buffer">Buffer.</param> | |
|
34 | protected TextScanner(char[] buffer) { | |
|
35 | if (buffer != null) { | |
|
36 | m_buffer = buffer; | |
|
37 | m_bufferSize = buffer.Length; | |
|
38 | } | |
|
39 | } | |
|
40 | ||
|
41 | /// <summary> | |
|
42 | /// (hungry) Reads the next token. | |
|
43 | /// </summary> | |
|
44 | /// <returns><c>true</c>, if token internal was read, <c>false</c> if there is no more tokens in the stream.</returns> | |
|
45 | /// <param name="dfa">The transition map for the automaton</param> | |
|
46 | /// <param name="final">Final states of the automaton.</param> | |
|
47 | /// <param name="tags">Tags.</param> | |
|
48 | /// <param name="state">The initial state for the automaton.</param> | |
|
49 | /// <param name="alphabet"></param> | |
|
50 | /// <param name = "tag"></param> | |
|
51 | internal bool ReadToken<TTag>(int[,] dfa, bool[] final, TTag[][] tags, int state, int[] alphabet, out TTag[] tag) { | |
|
52 | m_tokenLength = 0; | |
|
53 | tag = null; | |
|
54 | ||
|
55 | var maxSymbol = alphabet.Length - 1; | |
|
56 | int next; | |
|
57 | do { | |
|
58 | // after the next chunk is read the offset in the buffer may change | |
|
59 | int pos = m_bufferOffset + m_tokenLength; | |
|
60 | next = state; | |
|
61 | while (pos < m_bufferSize) { | |
|
62 | var ch = m_buffer[pos]; | |
|
63 | ||
|
64 | next = dfa[next, ch > maxSymbol ? AutomatonConst.UNCLASSIFIED_INPUT : alphabet[ch]]; | |
|
65 | ||
|
66 | if (next == AutomatonConst.UNREACHABLE_STATE) | |
|
67 | break; | |
|
68 | ||
|
69 | state = next; | |
|
70 | pos++; | |
|
71 | } | |
|
72 | m_tokenLength = pos - m_bufferOffset; | |
|
73 | } while (next != AutomatonConst.UNREACHABLE_STATE && Feed()); | |
|
74 | ||
|
75 | m_tokenOffset = m_bufferOffset; | |
|
76 | m_bufferOffset += m_tokenLength; | |
|
77 | ||
|
78 | if (final[state]) { | |
|
79 | tag = tags[state]; | |
|
80 | return true; | |
|
81 | } | |
|
82 | ||
|
83 | if (m_bufferOffset == m_bufferSize) { | |
|
84 | if (m_tokenLength == 0) //EOF | |
|
85 | return false; | |
|
86 | ||
|
87 | throw new ParserException(); | |
|
88 | } | |
|
89 | ||
|
90 | throw new ParserException(String.Format("Unexpected symbol '{0}'", m_buffer[m_bufferOffset])); | |
|
91 | ||
|
92 | } | |
|
93 | ||
|
94 | protected void Feed(char[] buffer, int offset, int length) { | |
|
95 | m_buffer = buffer; | |
|
96 | m_bufferOffset = offset; | |
|
97 | m_bufferSize = offset + length; | |
|
98 | } | |
|
99 | ||
|
100 | protected bool Feed() { | |
|
101 | if (m_chunkSize <= 0) | |
|
102 | return false; | |
|
103 | ||
|
104 | if (m_buffer != null) { | |
|
105 | var free = m_buffer.Length - m_bufferSize; | |
|
106 | ||
|
107 | if (free < m_chunkSize) { | |
|
108 | free += m_chunkSize; | |
|
109 | var used = m_bufferSize - m_bufferOffset; | |
|
110 | var size = used + free; | |
|
111 | ||
|
112 | if (size > m_bufferMax) | |
|
113 | throw new ParserException(String.Format("The buffer limit ({0} Kb) is reached", m_bufferMax / 1024)); | |
|
114 | ||
|
115 | var temp = new char[size]; | |
|
116 | ||
|
117 | var read = Read(temp, used, m_chunkSize); | |
|
118 | if (read == 0) | |
|
119 | return false; | |
|
120 | ||
|
121 | Array.Copy(m_buffer, m_bufferOffset, temp, 0, used); | |
|
122 | ||
|
123 | m_bufferOffset = 0; | |
|
124 | m_bufferSize = used + read; | |
|
125 | m_buffer = temp; | |
|
126 | } else { | |
|
127 | var read = Read(m_buffer, m_bufferSize, m_chunkSize); | |
|
128 | if (read == 0) | |
|
129 | return false; | |
|
130 | m_bufferSize += m_chunkSize; | |
|
131 | } | |
|
132 | return true; | |
|
133 | } else { | |
|
134 | Debug.Assert(m_bufferOffset == 0); | |
|
135 | m_buffer = new char[m_chunkSize]; | |
|
136 | m_bufferSize = Read(m_buffer, 0, m_chunkSize); | |
|
137 | return (m_bufferSize != 0); | |
|
138 | } | |
|
139 | } | |
|
140 | ||
|
141 | protected abstract int Read(char[] buffer, int offset, int size); | |
|
142 | ||
|
143 | public string GetTokenValue() { | |
|
144 | return new String(m_buffer, m_tokenOffset, m_tokenLength); | |
|
145 | } | |
|
146 | ||
|
147 | public void CopyTokenTo(char[] buffer, int offset) { | |
|
148 | Array.Copy(m_buffer, m_tokenOffset,buffer, offset, m_tokenLength); | |
|
149 | } | |
|
150 | ||
|
151 | public void CopyTokenTo(StringBuilder sb) { | |
|
152 | sb.Append(m_buffer, m_tokenOffset, m_tokenLength); | |
|
153 | } | |
|
154 | ||
|
155 | } | |
|
156 | } | |
|
157 |
@@ -0,0 +1,4 | |||
|
1 | <?xml version="1.0" encoding="utf-8"?> | |
|
2 | <packages> | |
|
3 | <package id="System.Text.Json" version="2.0.0.11" targetFramework="net45" /> | |
|
4 | </packages> No newline at end of file |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
This diff has been collapsed as it changes many lines, (10984 lines changed) Show them Hide them | |||
@@ -0,0 +1,10984 | |||
|
1 | <?xml version="1.0"?> | |
|
2 | <doc> | |
|
3 | <assembly> | |
|
4 | <name>nunit.framework</name> | |
|
5 | </assembly> | |
|
6 | <members> | |
|
7 | <member name="T:NUnit.Framework.ActionTargets"> | |
|
8 | <summary> | |
|
9 | The different targets a test action attribute can be applied to | |
|
10 | </summary> | |
|
11 | </member> | |
|
12 | <member name="F:NUnit.Framework.ActionTargets.Default"> | |
|
13 | <summary> | |
|
14 | Default target, which is determined by where the action attribute is attached | |
|
15 | </summary> | |
|
16 | </member> | |
|
17 | <member name="F:NUnit.Framework.ActionTargets.Test"> | |
|
18 | <summary> | |
|
19 | Target a individual test case | |
|
20 | </summary> | |
|
21 | </member> | |
|
22 | <member name="F:NUnit.Framework.ActionTargets.Suite"> | |
|
23 | <summary> | |
|
24 | Target a suite of test cases | |
|
25 | </summary> | |
|
26 | </member> | |
|
27 | <member name="T:NUnit.Framework.TestDelegate"> | |
|
28 | <summary> | |
|
29 | Delegate used by tests that execute code and | |
|
30 | capture any thrown exception. | |
|
31 | </summary> | |
|
32 | </member> | |
|
33 | <member name="T:NUnit.Framework.Assert"> | |
|
34 | <summary> | |
|
35 | The Assert class contains a collection of static methods that | |
|
36 | implement the most common assertions used in NUnit. | |
|
37 | </summary> | |
|
38 | </member> | |
|
39 | <member name="M:NUnit.Framework.Assert.#ctor"> | |
|
40 | <summary> | |
|
41 | We don't actually want any instances of this object, but some people | |
|
42 | like to inherit from it to add other static methods. Hence, the | |
|
43 | protected constructor disallows any instances of this object. | |
|
44 | </summary> | |
|
45 | </member> | |
|
46 | <member name="M:NUnit.Framework.Assert.Equals(System.Object,System.Object)"> | |
|
47 | <summary> | |
|
48 | The Equals method throws an AssertionException. This is done | |
|
49 | to make sure there is no mistake by calling this function. | |
|
50 | </summary> | |
|
51 | <param name="a"></param> | |
|
52 | <param name="b"></param> | |
|
53 | </member> | |
|
54 | <member name="M:NUnit.Framework.Assert.ReferenceEquals(System.Object,System.Object)"> | |
|
55 | <summary> | |
|
56 | override the default ReferenceEquals to throw an AssertionException. This | |
|
57 | implementation makes sure there is no mistake in calling this function | |
|
58 | as part of Assert. | |
|
59 | </summary> | |
|
60 | <param name="a"></param> | |
|
61 | <param name="b"></param> | |
|
62 | </member> | |
|
63 | <member name="M:NUnit.Framework.Assert.Pass(System.String,System.Object[])"> | |
|
64 | <summary> | |
|
65 | Throws a <see cref="T:NUnit.Framework.SuccessException"/> with the message and arguments | |
|
66 | that are passed in. This allows a test to be cut short, with a result | |
|
67 | of success returned to NUnit. | |
|
68 | </summary> | |
|
69 | <param name="message">The message to initialize the <see cref="T:NUnit.Framework.AssertionException"/> with.</param> | |
|
70 | <param name="args">Arguments to be used in formatting the message</param> | |
|
71 | </member> | |
|
72 | <member name="M:NUnit.Framework.Assert.Pass(System.String)"> | |
|
73 | <summary> | |
|
74 | Throws a <see cref="T:NUnit.Framework.SuccessException"/> with the message and arguments | |
|
75 | that are passed in. This allows a test to be cut short, with a result | |
|
76 | of success returned to NUnit. | |
|
77 | </summary> | |
|
78 | <param name="message">The message to initialize the <see cref="T:NUnit.Framework.AssertionException"/> with.</param> | |
|
79 | </member> | |
|
80 | <member name="M:NUnit.Framework.Assert.Pass"> | |
|
81 | <summary> | |
|
82 | Throws a <see cref="T:NUnit.Framework.SuccessException"/> with the message and arguments | |
|
83 | that are passed in. This allows a test to be cut short, with a result | |
|
84 | of success returned to NUnit. | |
|
85 | </summary> | |
|
86 | </member> | |
|
87 | <member name="M:NUnit.Framework.Assert.Fail(System.String,System.Object[])"> | |
|
88 | <summary> | |
|
89 | Throws an <see cref="T:NUnit.Framework.AssertionException"/> with the message and arguments | |
|
90 | that are passed in. This is used by the other Assert functions. | |
|
91 | </summary> | |
|
92 | <param name="message">The message to initialize the <see cref="T:NUnit.Framework.AssertionException"/> with.</param> | |
|
93 | <param name="args">Arguments to be used in formatting the message</param> | |
|
94 | </member> | |
|
95 | <member name="M:NUnit.Framework.Assert.Fail(System.String)"> | |
|
96 | <summary> | |
|
97 | Throws an <see cref="T:NUnit.Framework.AssertionException"/> with the message that is | |
|
98 | passed in. This is used by the other Assert functions. | |
|
99 | </summary> | |
|
100 | <param name="message">The message to initialize the <see cref="T:NUnit.Framework.AssertionException"/> with.</param> | |
|
101 | </member> | |
|
102 | <member name="M:NUnit.Framework.Assert.Fail"> | |
|
103 | <summary> | |
|
104 | Throws an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
105 | This is used by the other Assert functions. | |
|
106 | </summary> | |
|
107 | </member> | |
|
108 | <member name="M:NUnit.Framework.Assert.Ignore(System.String,System.Object[])"> | |
|
109 | <summary> | |
|
110 | Throws an <see cref="T:NUnit.Framework.IgnoreException"/> with the message and arguments | |
|
111 | that are passed in. This causes the test to be reported as ignored. | |
|
112 | </summary> | |
|
113 | <param name="message">The message to initialize the <see cref="T:NUnit.Framework.AssertionException"/> with.</param> | |
|
114 | <param name="args">Arguments to be used in formatting the message</param> | |
|
115 | </member> | |
|
116 | <member name="M:NUnit.Framework.Assert.Ignore(System.String)"> | |
|
117 | <summary> | |
|
118 | Throws an <see cref="T:NUnit.Framework.IgnoreException"/> with the message that is | |
|
119 | passed in. This causes the test to be reported as ignored. | |
|
120 | </summary> | |
|
121 | <param name="message">The message to initialize the <see cref="T:NUnit.Framework.AssertionException"/> with.</param> | |
|
122 | </member> | |
|
123 | <member name="M:NUnit.Framework.Assert.Ignore"> | |
|
124 | <summary> | |
|
125 | Throws an <see cref="T:NUnit.Framework.IgnoreException"/>. | |
|
126 | This causes the test to be reported as ignored. | |
|
127 | </summary> | |
|
128 | </member> | |
|
129 | <member name="M:NUnit.Framework.Assert.Inconclusive(System.String,System.Object[])"> | |
|
130 | <summary> | |
|
131 | Throws an <see cref="T:NUnit.Framework.InconclusiveException"/> with the message and arguments | |
|
132 | that are passed in. This causes the test to be reported as inconclusive. | |
|
133 | </summary> | |
|
134 | <param name="message">The message to initialize the <see cref="T:NUnit.Framework.InconclusiveException"/> with.</param> | |
|
135 | <param name="args">Arguments to be used in formatting the message</param> | |
|
136 | </member> | |
|
137 | <member name="M:NUnit.Framework.Assert.Inconclusive(System.String)"> | |
|
138 | <summary> | |
|
139 | Throws an <see cref="T:NUnit.Framework.InconclusiveException"/> with the message that is | |
|
140 | passed in. This causes the test to be reported as inconclusive. | |
|
141 | </summary> | |
|
142 | <param name="message">The message to initialize the <see cref="T:NUnit.Framework.InconclusiveException"/> with.</param> | |
|
143 | </member> | |
|
144 | <member name="M:NUnit.Framework.Assert.Inconclusive"> | |
|
145 | <summary> | |
|
146 | Throws an <see cref="T:NUnit.Framework.InconclusiveException"/>. | |
|
147 | This causes the test to be reported as Inconclusive. | |
|
148 | </summary> | |
|
149 | </member> | |
|
150 | <member name="M:NUnit.Framework.Assert.That(System.Object,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
151 | <summary> | |
|
152 | Apply a constraint to an actual value, succeeding if the constraint | |
|
153 | is satisfied and throwing an assertion exception on failure. | |
|
154 | </summary> | |
|
155 | <param name="actual">The actual value to test</param> | |
|
156 | <param name="expression">A Constraint to be applied</param> | |
|
157 | </member> | |
|
158 | <member name="M:NUnit.Framework.Assert.That(System.Object,NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
159 | <summary> | |
|
160 | Apply a constraint to an actual value, succeeding if the constraint | |
|
161 | is satisfied and throwing an assertion exception on failure. | |
|
162 | </summary> | |
|
163 | <param name="actual">The actual value to test</param> | |
|
164 | <param name="expression">A Constraint to be applied</param> | |
|
165 | <param name="message">The message that will be displayed on failure</param> | |
|
166 | </member> | |
|
167 | <member name="M:NUnit.Framework.Assert.That(System.Object,NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
168 | <summary> | |
|
169 | Apply a constraint to an actual value, succeeding if the constraint | |
|
170 | is satisfied and throwing an assertion exception on failure. | |
|
171 | </summary> | |
|
172 | <param name="actual">The actual value to test</param> | |
|
173 | <param name="expression">A Constraint expression to be applied</param> | |
|
174 | <param name="message">The message that will be displayed on failure</param> | |
|
175 | <param name="args">Arguments to be used in formatting the message</param> | |
|
176 | </member> | |
|
177 | <member name="M:NUnit.Framework.Assert.That(System.Boolean,System.String,System.Object[])"> | |
|
178 | <summary> | |
|
179 | Asserts that a condition is true. If the condition is false the method throws | |
|
180 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
181 | </summary> | |
|
182 | <param name="condition">The evaluated condition</param> | |
|
183 | <param name="message">The message to display if the condition is false</param> | |
|
184 | <param name="args">Arguments to be used in formatting the message</param> | |
|
185 | </member> | |
|
186 | <member name="M:NUnit.Framework.Assert.That(System.Boolean,System.String)"> | |
|
187 | <summary> | |
|
188 | Asserts that a condition is true. If the condition is false the method throws | |
|
189 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
190 | </summary> | |
|
191 | <param name="condition">The evaluated condition</param> | |
|
192 | <param name="message">The message to display if the condition is false</param> | |
|
193 | </member> | |
|
194 | <member name="M:NUnit.Framework.Assert.That(System.Boolean)"> | |
|
195 | <summary> | |
|
196 | Asserts that a condition is true. If the condition is false the method throws | |
|
197 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
198 | </summary> | |
|
199 | <param name="condition">The evaluated condition</param> | |
|
200 | </member> | |
|
201 | <member name="M:NUnit.Framework.Assert.That``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
202 | <summary> | |
|
203 | Apply a constraint to an actual value, succeeding if the constraint | |
|
204 | is satisfied and throwing an assertion exception on failure. | |
|
205 | </summary> | |
|
206 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
207 | <param name="expr">A Constraint expression to be applied</param> | |
|
208 | </member> | |
|
209 | <member name="M:NUnit.Framework.Assert.That``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
210 | <summary> | |
|
211 | Apply a constraint to an actual value, succeeding if the constraint | |
|
212 | is satisfied and throwing an assertion exception on failure. | |
|
213 | </summary> | |
|
214 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
215 | <param name="expr">A Constraint expression to be applied</param> | |
|
216 | <param name="message">The message that will be displayed on failure</param> | |
|
217 | </member> | |
|
218 | <member name="M:NUnit.Framework.Assert.That``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
219 | <summary> | |
|
220 | Apply a constraint to an actual value, succeeding if the constraint | |
|
221 | is satisfied and throwing an assertion exception on failure. | |
|
222 | </summary> | |
|
223 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
224 | <param name="expr">A Constraint expression to be applied</param> | |
|
225 | <param name="message">The message that will be displayed on failure</param> | |
|
226 | <param name="args">Arguments to be used in formatting the message</param> | |
|
227 | </member> | |
|
228 | <member name="M:NUnit.Framework.Assert.That``1(``0@,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
229 | <summary> | |
|
230 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
231 | is satisfied and throwing an assertion exception on failure. | |
|
232 | </summary> | |
|
233 | <param name="actual">The actual value to test</param> | |
|
234 | <param name="expression">A Constraint to be applied</param> | |
|
235 | </member> | |
|
236 | <member name="M:NUnit.Framework.Assert.That``1(``0@,NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
237 | <summary> | |
|
238 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
239 | is satisfied and throwing an assertion exception on failure. | |
|
240 | </summary> | |
|
241 | <param name="actual">The actual value to test</param> | |
|
242 | <param name="expression">A Constraint to be applied</param> | |
|
243 | <param name="message">The message that will be displayed on failure</param> | |
|
244 | </member> | |
|
245 | <member name="M:NUnit.Framework.Assert.That``1(``0@,NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
246 | <summary> | |
|
247 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
248 | is satisfied and throwing an assertion exception on failure. | |
|
249 | </summary> | |
|
250 | <param name="actual">The actual value to test</param> | |
|
251 | <param name="expression">A Constraint to be applied</param> | |
|
252 | <param name="message">The message that will be displayed on failure</param> | |
|
253 | <param name="args">Arguments to be used in formatting the message</param> | |
|
254 | </member> | |
|
255 | <member name="M:NUnit.Framework.Assert.That(NUnit.Framework.TestDelegate,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
256 | <summary> | |
|
257 | Asserts that the code represented by a delegate throws an exception | |
|
258 | that satisfies the constraint provided. | |
|
259 | </summary> | |
|
260 | <param name="code">A TestDelegate to be executed</param> | |
|
261 | <param name="constraint">A ThrowsConstraint used in the test</param> | |
|
262 | </member> | |
|
263 | <member name="M:NUnit.Framework.Assert.ByVal(System.Object,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
264 | <summary> | |
|
265 | Apply a constraint to an actual value, succeeding if the constraint | |
|
266 | is satisfied and throwing an assertion exception on failure. | |
|
267 | Used as a synonym for That in rare cases where a private setter | |
|
268 | causes a Visual Basic compilation error. | |
|
269 | </summary> | |
|
270 | <param name="actual">The actual value to test</param> | |
|
271 | <param name="expression">A Constraint to be applied</param> | |
|
272 | </member> | |
|
273 | <member name="M:NUnit.Framework.Assert.ByVal(System.Object,NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
274 | <summary> | |
|
275 | Apply a constraint to an actual value, succeeding if the constraint | |
|
276 | is satisfied and throwing an assertion exception on failure. | |
|
277 | Used as a synonym for That in rare cases where a private setter | |
|
278 | causes a Visual Basic compilation error. | |
|
279 | </summary> | |
|
280 | <param name="actual">The actual value to test</param> | |
|
281 | <param name="expression">A Constraint to be applied</param> | |
|
282 | <param name="message">The message that will be displayed on failure</param> | |
|
283 | </member> | |
|
284 | <member name="M:NUnit.Framework.Assert.ByVal(System.Object,NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
285 | <summary> | |
|
286 | Apply a constraint to an actual value, succeeding if the constraint | |
|
287 | is satisfied and throwing an assertion exception on failure. | |
|
288 | Used as a synonym for That in rare cases where a private setter | |
|
289 | causes a Visual Basic compilation error. | |
|
290 | </summary> | |
|
291 | <remarks> | |
|
292 | This method is provided for use by VB developers needing to test | |
|
293 | the value of properties with private setters. | |
|
294 | </remarks> | |
|
295 | <param name="actual">The actual value to test</param> | |
|
296 | <param name="expression">A Constraint expression to be applied</param> | |
|
297 | <param name="message">The message that will be displayed on failure</param> | |
|
298 | <param name="args">Arguments to be used in formatting the message</param> | |
|
299 | </member> | |
|
300 | <member name="M:NUnit.Framework.Assert.Throws(NUnit.Framework.Constraints.IResolveConstraint,NUnit.Framework.TestDelegate,System.String,System.Object[])"> | |
|
301 | <summary> | |
|
302 | Verifies that a delegate throws a particular exception when called. | |
|
303 | </summary> | |
|
304 | <param name="expression">A constraint to be satisfied by the exception</param> | |
|
305 | <param name="code">A TestDelegate</param> | |
|
306 | <param name="message">The message that will be displayed on failure</param> | |
|
307 | <param name="args">Arguments to be used in formatting the message</param> | |
|
308 | </member> | |
|
309 | <member name="M:NUnit.Framework.Assert.Throws(NUnit.Framework.Constraints.IResolveConstraint,NUnit.Framework.TestDelegate,System.String)"> | |
|
310 | <summary> | |
|
311 | Verifies that a delegate throws a particular exception when called. | |
|
312 | </summary> | |
|
313 | <param name="expression">A constraint to be satisfied by the exception</param> | |
|
314 | <param name="code">A TestDelegate</param> | |
|
315 | <param name="message">The message that will be displayed on failure</param> | |
|
316 | </member> | |
|
317 | <member name="M:NUnit.Framework.Assert.Throws(NUnit.Framework.Constraints.IResolveConstraint,NUnit.Framework.TestDelegate)"> | |
|
318 | <summary> | |
|
319 | Verifies that a delegate throws a particular exception when called. | |
|
320 | </summary> | |
|
321 | <param name="expression">A constraint to be satisfied by the exception</param> | |
|
322 | <param name="code">A TestDelegate</param> | |
|
323 | </member> | |
|
324 | <member name="M:NUnit.Framework.Assert.Throws(System.Type,NUnit.Framework.TestDelegate,System.String,System.Object[])"> | |
|
325 | <summary> | |
|
326 | Verifies that a delegate throws a particular exception when called. | |
|
327 | </summary> | |
|
328 | <param name="expectedExceptionType">The exception Type expected</param> | |
|
329 | <param name="code">A TestDelegate</param> | |
|
330 | <param name="message">The message that will be displayed on failure</param> | |
|
331 | <param name="args">Arguments to be used in formatting the message</param> | |
|
332 | </member> | |
|
333 | <member name="M:NUnit.Framework.Assert.Throws(System.Type,NUnit.Framework.TestDelegate,System.String)"> | |
|
334 | <summary> | |
|
335 | Verifies that a delegate throws a particular exception when called. | |
|
336 | </summary> | |
|
337 | <param name="expectedExceptionType">The exception Type expected</param> | |
|
338 | <param name="code">A TestDelegate</param> | |
|
339 | <param name="message">The message that will be displayed on failure</param> | |
|
340 | </member> | |
|
341 | <member name="M:NUnit.Framework.Assert.Throws(System.Type,NUnit.Framework.TestDelegate)"> | |
|
342 | <summary> | |
|
343 | Verifies that a delegate throws a particular exception when called. | |
|
344 | </summary> | |
|
345 | <param name="expectedExceptionType">The exception Type expected</param> | |
|
346 | <param name="code">A TestDelegate</param> | |
|
347 | </member> | |
|
348 | <member name="M:NUnit.Framework.Assert.Throws``1(NUnit.Framework.TestDelegate,System.String,System.Object[])"> | |
|
349 | <summary> | |
|
350 | Verifies that a delegate throws a particular exception when called. | |
|
351 | </summary> | |
|
352 | <typeparam name="T">Type of the expected exception</typeparam> | |
|
353 | <param name="code">A TestDelegate</param> | |
|
354 | <param name="message">The message that will be displayed on failure</param> | |
|
355 | <param name="args">Arguments to be used in formatting the message</param> | |
|
356 | </member> | |
|
357 | <member name="M:NUnit.Framework.Assert.Throws``1(NUnit.Framework.TestDelegate,System.String)"> | |
|
358 | <summary> | |
|
359 | Verifies that a delegate throws a particular exception when called. | |
|
360 | </summary> | |
|
361 | <typeparam name="T">Type of the expected exception</typeparam> | |
|
362 | <param name="code">A TestDelegate</param> | |
|
363 | <param name="message">The message that will be displayed on failure</param> | |
|
364 | </member> | |
|
365 | <member name="M:NUnit.Framework.Assert.Throws``1(NUnit.Framework.TestDelegate)"> | |
|
366 | <summary> | |
|
367 | Verifies that a delegate throws a particular exception when called. | |
|
368 | </summary> | |
|
369 | <typeparam name="T">Type of the expected exception</typeparam> | |
|
370 | <param name="code">A TestDelegate</param> | |
|
371 | </member> | |
|
372 | <member name="M:NUnit.Framework.Assert.Catch(NUnit.Framework.TestDelegate,System.String,System.Object[])"> | |
|
373 | <summary> | |
|
374 | Verifies that a delegate throws an exception when called | |
|
375 | and returns it. | |
|
376 | </summary> | |
|
377 | <param name="code">A TestDelegate</param> | |
|
378 | <param name="message">The message that will be displayed on failure</param> | |
|
379 | <param name="args">Arguments to be used in formatting the message</param> | |
|
380 | </member> | |
|
381 | <member name="M:NUnit.Framework.Assert.Catch(NUnit.Framework.TestDelegate,System.String)"> | |
|
382 | <summary> | |
|
383 | Verifies that a delegate throws an exception when called | |
|
384 | and returns it. | |
|
385 | </summary> | |
|
386 | <param name="code">A TestDelegate</param> | |
|
387 | <param name="message">The message that will be displayed on failure</param> | |
|
388 | </member> | |
|
389 | <member name="M:NUnit.Framework.Assert.Catch(NUnit.Framework.TestDelegate)"> | |
|
390 | <summary> | |
|
391 | Verifies that a delegate throws an exception when called | |
|
392 | and returns it. | |
|
393 | </summary> | |
|
394 | <param name="code">A TestDelegate</param> | |
|
395 | </member> | |
|
396 | <member name="M:NUnit.Framework.Assert.Catch(System.Type,NUnit.Framework.TestDelegate,System.String,System.Object[])"> | |
|
397 | <summary> | |
|
398 | Verifies that a delegate throws an exception of a certain Type | |
|
399 | or one derived from it when called and returns it. | |
|
400 | </summary> | |
|
401 | <param name="expectedExceptionType">The expected Exception Type</param> | |
|
402 | <param name="code">A TestDelegate</param> | |
|
403 | <param name="message">The message that will be displayed on failure</param> | |
|
404 | <param name="args">Arguments to be used in formatting the message</param> | |
|
405 | </member> | |
|
406 | <member name="M:NUnit.Framework.Assert.Catch(System.Type,NUnit.Framework.TestDelegate,System.String)"> | |
|
407 | <summary> | |
|
408 | Verifies that a delegate throws an exception of a certain Type | |
|
409 | or one derived from it when called and returns it. | |
|
410 | </summary> | |
|
411 | <param name="expectedExceptionType">The expected Exception Type</param> | |
|
412 | <param name="code">A TestDelegate</param> | |
|
413 | <param name="message">The message that will be displayed on failure</param> | |
|
414 | </member> | |
|
415 | <member name="M:NUnit.Framework.Assert.Catch(System.Type,NUnit.Framework.TestDelegate)"> | |
|
416 | <summary> | |
|
417 | Verifies that a delegate throws an exception of a certain Type | |
|
418 | or one derived from it when called and returns it. | |
|
419 | </summary> | |
|
420 | <param name="expectedExceptionType">The expected Exception Type</param> | |
|
421 | <param name="code">A TestDelegate</param> | |
|
422 | </member> | |
|
423 | <member name="M:NUnit.Framework.Assert.Catch``1(NUnit.Framework.TestDelegate,System.String,System.Object[])"> | |
|
424 | <summary> | |
|
425 | Verifies that a delegate throws an exception of a certain Type | |
|
426 | or one derived from it when called and returns it. | |
|
427 | </summary> | |
|
428 | <typeparam name="T">The expected Exception Type</typeparam> | |
|
429 | <param name="code">A TestDelegate</param> | |
|
430 | <param name="message">The message that will be displayed on failure</param> | |
|
431 | <param name="args">Arguments to be used in formatting the message</param> | |
|
432 | </member> | |
|
433 | <member name="M:NUnit.Framework.Assert.Catch``1(NUnit.Framework.TestDelegate,System.String)"> | |
|
434 | <summary> | |
|
435 | Verifies that a delegate throws an exception of a certain Type | |
|
436 | or one derived from it when called and returns it. | |
|
437 | </summary> | |
|
438 | <typeparam name="T">The expected Exception Type</typeparam> | |
|
439 | <param name="code">A TestDelegate</param> | |
|
440 | <param name="message">The message that will be displayed on failure</param> | |
|
441 | </member> | |
|
442 | <member name="M:NUnit.Framework.Assert.Catch``1(NUnit.Framework.TestDelegate)"> | |
|
443 | <summary> | |
|
444 | Verifies that a delegate throws an exception of a certain Type | |
|
445 | or one derived from it when called and returns it. | |
|
446 | </summary> | |
|
447 | <typeparam name="T">The expected Exception Type</typeparam> | |
|
448 | <param name="code">A TestDelegate</param> | |
|
449 | </member> | |
|
450 | <member name="M:NUnit.Framework.Assert.DoesNotThrow(NUnit.Framework.TestDelegate,System.String,System.Object[])"> | |
|
451 | <summary> | |
|
452 | Verifies that a delegate does not throw an exception | |
|
453 | </summary> | |
|
454 | <param name="code">A TestDelegate</param> | |
|
455 | <param name="message">The message that will be displayed on failure</param> | |
|
456 | <param name="args">Arguments to be used in formatting the message</param> | |
|
457 | </member> | |
|
458 | <member name="M:NUnit.Framework.Assert.DoesNotThrow(NUnit.Framework.TestDelegate,System.String)"> | |
|
459 | <summary> | |
|
460 | Verifies that a delegate does not throw an exception. | |
|
461 | </summary> | |
|
462 | <param name="code">A TestDelegate</param> | |
|
463 | <param name="message">The message that will be displayed on failure</param> | |
|
464 | </member> | |
|
465 | <member name="M:NUnit.Framework.Assert.DoesNotThrow(NUnit.Framework.TestDelegate)"> | |
|
466 | <summary> | |
|
467 | Verifies that a delegate does not throw an exception. | |
|
468 | </summary> | |
|
469 | <param name="code">A TestDelegate</param> | |
|
470 | </member> | |
|
471 | <member name="M:NUnit.Framework.Assert.True(System.Boolean,System.String,System.Object[])"> | |
|
472 | <summary> | |
|
473 | Asserts that a condition is true. If the condition is false the method throws | |
|
474 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
475 | </summary> | |
|
476 | <param name="condition">The evaluated condition</param> | |
|
477 | <param name="message">The message to display in case of failure</param> | |
|
478 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
479 | </member> | |
|
480 | <member name="M:NUnit.Framework.Assert.True(System.Boolean,System.String)"> | |
|
481 | <summary> | |
|
482 | Asserts that a condition is true. If the condition is false the method throws | |
|
483 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
484 | </summary> | |
|
485 | <param name="condition">The evaluated condition</param> | |
|
486 | <param name="message">The message to display in case of failure</param> | |
|
487 | </member> | |
|
488 | <member name="M:NUnit.Framework.Assert.True(System.Boolean)"> | |
|
489 | <summary> | |
|
490 | Asserts that a condition is true. If the condition is false the method throws | |
|
491 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
492 | </summary> | |
|
493 | <param name="condition">The evaluated condition</param> | |
|
494 | </member> | |
|
495 | <member name="M:NUnit.Framework.Assert.IsTrue(System.Boolean,System.String,System.Object[])"> | |
|
496 | <summary> | |
|
497 | Asserts that a condition is true. If the condition is false the method throws | |
|
498 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
499 | </summary> | |
|
500 | <param name="condition">The evaluated condition</param> | |
|
501 | <param name="message">The message to display in case of failure</param> | |
|
502 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
503 | </member> | |
|
504 | <member name="M:NUnit.Framework.Assert.IsTrue(System.Boolean,System.String)"> | |
|
505 | <summary> | |
|
506 | Asserts that a condition is true. If the condition is false the method throws | |
|
507 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
508 | </summary> | |
|
509 | <param name="condition">The evaluated condition</param> | |
|
510 | <param name="message">The message to display in case of failure</param> | |
|
511 | </member> | |
|
512 | <member name="M:NUnit.Framework.Assert.IsTrue(System.Boolean)"> | |
|
513 | <summary> | |
|
514 | Asserts that a condition is true. If the condition is false the method throws | |
|
515 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
516 | </summary> | |
|
517 | <param name="condition">The evaluated condition</param> | |
|
518 | </member> | |
|
519 | <member name="M:NUnit.Framework.Assert.False(System.Boolean,System.String,System.Object[])"> | |
|
520 | <summary> | |
|
521 | Asserts that a condition is false. If the condition is true the method throws | |
|
522 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
523 | </summary> | |
|
524 | <param name="condition">The evaluated condition</param> | |
|
525 | <param name="message">The message to display in case of failure</param> | |
|
526 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
527 | </member> | |
|
528 | <member name="M:NUnit.Framework.Assert.False(System.Boolean,System.String)"> | |
|
529 | <summary> | |
|
530 | Asserts that a condition is false. If the condition is true the method throws | |
|
531 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
532 | </summary> | |
|
533 | <param name="condition">The evaluated condition</param> | |
|
534 | <param name="message">The message to display in case of failure</param> | |
|
535 | </member> | |
|
536 | <member name="M:NUnit.Framework.Assert.False(System.Boolean)"> | |
|
537 | <summary> | |
|
538 | Asserts that a condition is false. If the condition is true the method throws | |
|
539 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
540 | </summary> | |
|
541 | <param name="condition">The evaluated condition</param> | |
|
542 | </member> | |
|
543 | <member name="M:NUnit.Framework.Assert.IsFalse(System.Boolean,System.String,System.Object[])"> | |
|
544 | <summary> | |
|
545 | Asserts that a condition is false. If the condition is true the method throws | |
|
546 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
547 | </summary> | |
|
548 | <param name="condition">The evaluated condition</param> | |
|
549 | <param name="message">The message to display in case of failure</param> | |
|
550 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
551 | </member> | |
|
552 | <member name="M:NUnit.Framework.Assert.IsFalse(System.Boolean,System.String)"> | |
|
553 | <summary> | |
|
554 | Asserts that a condition is false. If the condition is true the method throws | |
|
555 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
556 | </summary> | |
|
557 | <param name="condition">The evaluated condition</param> | |
|
558 | <param name="message">The message to display in case of failure</param> | |
|
559 | </member> | |
|
560 | <member name="M:NUnit.Framework.Assert.IsFalse(System.Boolean)"> | |
|
561 | <summary> | |
|
562 | Asserts that a condition is false. If the condition is true the method throws | |
|
563 | an <see cref="T:NUnit.Framework.AssertionException"/>. | |
|
564 | </summary> | |
|
565 | <param name="condition">The evaluated condition</param> | |
|
566 | </member> | |
|
567 | <member name="M:NUnit.Framework.Assert.NotNull(System.Object,System.String,System.Object[])"> | |
|
568 | <summary> | |
|
569 | Verifies that the object that is passed in is not equal to <code>null</code> | |
|
570 | If the object is <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
571 | is thrown. | |
|
572 | </summary> | |
|
573 | <param name="anObject">The object that is to be tested</param> | |
|
574 | <param name="message">The message to display in case of failure</param> | |
|
575 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
576 | </member> | |
|
577 | <member name="M:NUnit.Framework.Assert.NotNull(System.Object,System.String)"> | |
|
578 | <summary> | |
|
579 | Verifies that the object that is passed in is not equal to <code>null</code> | |
|
580 | If the object is <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
581 | is thrown. | |
|
582 | </summary> | |
|
583 | <param name="anObject">The object that is to be tested</param> | |
|
584 | <param name="message">The message to display in case of failure</param> | |
|
585 | </member> | |
|
586 | <member name="M:NUnit.Framework.Assert.NotNull(System.Object)"> | |
|
587 | <summary> | |
|
588 | Verifies that the object that is passed in is not equal to <code>null</code> | |
|
589 | If the object is <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
590 | is thrown. | |
|
591 | </summary> | |
|
592 | <param name="anObject">The object that is to be tested</param> | |
|
593 | </member> | |
|
594 | <member name="M:NUnit.Framework.Assert.IsNotNull(System.Object,System.String,System.Object[])"> | |
|
595 | <summary> | |
|
596 | Verifies that the object that is passed in is not equal to <code>null</code> | |
|
597 | If the object is <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
598 | is thrown. | |
|
599 | </summary> | |
|
600 | <param name="anObject">The object that is to be tested</param> | |
|
601 | <param name="message">The message to display in case of failure</param> | |
|
602 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
603 | </member> | |
|
604 | <member name="M:NUnit.Framework.Assert.IsNotNull(System.Object,System.String)"> | |
|
605 | <summary> | |
|
606 | Verifies that the object that is passed in is not equal to <code>null</code> | |
|
607 | If the object is <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
608 | is thrown. | |
|
609 | </summary> | |
|
610 | <param name="anObject">The object that is to be tested</param> | |
|
611 | <param name="message">The message to display in case of failure</param> | |
|
612 | </member> | |
|
613 | <member name="M:NUnit.Framework.Assert.IsNotNull(System.Object)"> | |
|
614 | <summary> | |
|
615 | Verifies that the object that is passed in is not equal to <code>null</code> | |
|
616 | If the object is <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
617 | is thrown. | |
|
618 | </summary> | |
|
619 | <param name="anObject">The object that is to be tested</param> | |
|
620 | </member> | |
|
621 | <member name="M:NUnit.Framework.Assert.Null(System.Object,System.String,System.Object[])"> | |
|
622 | <summary> | |
|
623 | Verifies that the object that is passed in is equal to <code>null</code> | |
|
624 | If the object is not <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
625 | is thrown. | |
|
626 | </summary> | |
|
627 | <param name="anObject">The object that is to be tested</param> | |
|
628 | <param name="message">The message to display in case of failure</param> | |
|
629 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
630 | </member> | |
|
631 | <member name="M:NUnit.Framework.Assert.Null(System.Object,System.String)"> | |
|
632 | <summary> | |
|
633 | Verifies that the object that is passed in is equal to <code>null</code> | |
|
634 | If the object is not <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
635 | is thrown. | |
|
636 | </summary> | |
|
637 | <param name="anObject">The object that is to be tested</param> | |
|
638 | <param name="message">The message to display in case of failure</param> | |
|
639 | </member> | |
|
640 | <member name="M:NUnit.Framework.Assert.Null(System.Object)"> | |
|
641 | <summary> | |
|
642 | Verifies that the object that is passed in is equal to <code>null</code> | |
|
643 | If the object is not <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
644 | is thrown. | |
|
645 | </summary> | |
|
646 | <param name="anObject">The object that is to be tested</param> | |
|
647 | </member> | |
|
648 | <member name="M:NUnit.Framework.Assert.IsNull(System.Object,System.String,System.Object[])"> | |
|
649 | <summary> | |
|
650 | Verifies that the object that is passed in is equal to <code>null</code> | |
|
651 | If the object is not <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
652 | is thrown. | |
|
653 | </summary> | |
|
654 | <param name="anObject">The object that is to be tested</param> | |
|
655 | <param name="message">The message to display in case of failure</param> | |
|
656 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
657 | </member> | |
|
658 | <member name="M:NUnit.Framework.Assert.IsNull(System.Object,System.String)"> | |
|
659 | <summary> | |
|
660 | Verifies that the object that is passed in is equal to <code>null</code> | |
|
661 | If the object is not <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
662 | is thrown. | |
|
663 | </summary> | |
|
664 | <param name="anObject">The object that is to be tested</param> | |
|
665 | <param name="message">The message to display in case of failure</param> | |
|
666 | </member> | |
|
667 | <member name="M:NUnit.Framework.Assert.IsNull(System.Object)"> | |
|
668 | <summary> | |
|
669 | Verifies that the object that is passed in is equal to <code>null</code> | |
|
670 | If the object is not <code>null</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
671 | is thrown. | |
|
672 | </summary> | |
|
673 | <param name="anObject">The object that is to be tested</param> | |
|
674 | </member> | |
|
675 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Int32,System.Int32,System.String,System.Object[])"> | |
|
676 | <summary> | |
|
677 | Verifies that two ints are equal. If they are not, then an | |
|
678 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
679 | </summary> | |
|
680 | <param name="expected">The expected value</param> | |
|
681 | <param name="actual">The actual value</param> | |
|
682 | <param name="message">The message to display in case of failure</param> | |
|
683 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
684 | </member> | |
|
685 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Int32,System.Int32,System.String)"> | |
|
686 | <summary> | |
|
687 | Verifies that two ints are equal. If they are not, then an | |
|
688 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
689 | </summary> | |
|
690 | <param name="expected">The expected value</param> | |
|
691 | <param name="actual">The actual value</param> | |
|
692 | <param name="message">The message to display in case of failure</param> | |
|
693 | </member> | |
|
694 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Int32,System.Int32)"> | |
|
695 | <summary> | |
|
696 | Verifies that two ints are equal. If they are not, then an | |
|
697 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
698 | </summary> | |
|
699 | <param name="expected">The expected value</param> | |
|
700 | <param name="actual">The actual value</param> | |
|
701 | </member> | |
|
702 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Int64,System.Int64,System.String,System.Object[])"> | |
|
703 | <summary> | |
|
704 | Verifies that two longs are equal. If they are not, then an | |
|
705 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
706 | </summary> | |
|
707 | <param name="expected">The expected value</param> | |
|
708 | <param name="actual">The actual value</param> | |
|
709 | <param name="message">The message to display in case of failure</param> | |
|
710 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
711 | </member> | |
|
712 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Int64,System.Int64,System.String)"> | |
|
713 | <summary> | |
|
714 | Verifies that two longs are equal. If they are not, then an | |
|
715 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
716 | </summary> | |
|
717 | <param name="expected">The expected value</param> | |
|
718 | <param name="actual">The actual value</param> | |
|
719 | <param name="message">The message to display in case of failure</param> | |
|
720 | </member> | |
|
721 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Int64,System.Int64)"> | |
|
722 | <summary> | |
|
723 | Verifies that two longs are equal. If they are not, then an | |
|
724 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
725 | </summary> | |
|
726 | <param name="expected">The expected value</param> | |
|
727 | <param name="actual">The actual value</param> | |
|
728 | </member> | |
|
729 | <member name="M:NUnit.Framework.Assert.AreEqual(System.UInt32,System.UInt32,System.String,System.Object[])"> | |
|
730 | <summary> | |
|
731 | Verifies that two unsigned ints are equal. If they are not, then an | |
|
732 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
733 | </summary> | |
|
734 | <param name="expected">The expected value</param> | |
|
735 | <param name="actual">The actual value</param> | |
|
736 | <param name="message">The message to display in case of failure</param> | |
|
737 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
738 | </member> | |
|
739 | <member name="M:NUnit.Framework.Assert.AreEqual(System.UInt32,System.UInt32,System.String)"> | |
|
740 | <summary> | |
|
741 | Verifies that two unsigned ints are equal. If they are not, then an | |
|
742 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
743 | </summary> | |
|
744 | <param name="expected">The expected value</param> | |
|
745 | <param name="actual">The actual value</param> | |
|
746 | <param name="message">The message to display in case of failure</param> | |
|
747 | </member> | |
|
748 | <member name="M:NUnit.Framework.Assert.AreEqual(System.UInt32,System.UInt32)"> | |
|
749 | <summary> | |
|
750 | Verifies that two unsigned ints are equal. If they are not, then an | |
|
751 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
752 | </summary> | |
|
753 | <param name="expected">The expected value</param> | |
|
754 | <param name="actual">The actual value</param> | |
|
755 | </member> | |
|
756 | <member name="M:NUnit.Framework.Assert.AreEqual(System.UInt64,System.UInt64,System.String,System.Object[])"> | |
|
757 | <summary> | |
|
758 | Verifies that two unsigned longs are equal. If they are not, then an | |
|
759 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
760 | </summary> | |
|
761 | <param name="expected">The expected value</param> | |
|
762 | <param name="actual">The actual value</param> | |
|
763 | <param name="message">The message to display in case of failure</param> | |
|
764 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
765 | </member> | |
|
766 | <member name="M:NUnit.Framework.Assert.AreEqual(System.UInt64,System.UInt64,System.String)"> | |
|
767 | <summary> | |
|
768 | Verifies that two unsigned longs are equal. If they are not, then an | |
|
769 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
770 | </summary> | |
|
771 | <param name="expected">The expected value</param> | |
|
772 | <param name="actual">The actual value</param> | |
|
773 | <param name="message">The message to display in case of failure</param> | |
|
774 | </member> | |
|
775 | <member name="M:NUnit.Framework.Assert.AreEqual(System.UInt64,System.UInt64)"> | |
|
776 | <summary> | |
|
777 | Verifies that two unsigned longs are equal. If they are not, then an | |
|
778 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
779 | </summary> | |
|
780 | <param name="expected">The expected value</param> | |
|
781 | <param name="actual">The actual value</param> | |
|
782 | </member> | |
|
783 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Decimal,System.Decimal,System.String,System.Object[])"> | |
|
784 | <summary> | |
|
785 | Verifies that two decimals are equal. If they are not, then an | |
|
786 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
787 | </summary> | |
|
788 | <param name="expected">The expected value</param> | |
|
789 | <param name="actual">The actual value</param> | |
|
790 | <param name="message">The message to display in case of failure</param> | |
|
791 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
792 | </member> | |
|
793 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Decimal,System.Decimal,System.String)"> | |
|
794 | <summary> | |
|
795 | Verifies that two decimals are equal. If they are not, then an | |
|
796 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
797 | </summary> | |
|
798 | <param name="expected">The expected value</param> | |
|
799 | <param name="actual">The actual value</param> | |
|
800 | <param name="message">The message to display in case of failure</param> | |
|
801 | </member> | |
|
802 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Decimal,System.Decimal)"> | |
|
803 | <summary> | |
|
804 | Verifies that two decimals are equal. If they are not, then an | |
|
805 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
806 | </summary> | |
|
807 | <param name="expected">The expected value</param> | |
|
808 | <param name="actual">The actual value</param> | |
|
809 | </member> | |
|
810 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Double,System.Double,System.Double,System.String,System.Object[])"> | |
|
811 | <summary> | |
|
812 | Verifies that two doubles are equal considering a delta. If the | |
|
813 | expected value is infinity then the delta value is ignored. If | |
|
814 | they are not equal then an <see cref="T:NUnit.Framework.AssertionException"/> is | |
|
815 | thrown. | |
|
816 | </summary> | |
|
817 | <param name="expected">The expected value</param> | |
|
818 | <param name="actual">The actual value</param> | |
|
819 | <param name="delta">The maximum acceptable difference between the | |
|
820 | the expected and the actual</param> | |
|
821 | <param name="message">The message to display in case of failure</param> | |
|
822 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
823 | </member> | |
|
824 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Double,System.Double,System.Double,System.String)"> | |
|
825 | <summary> | |
|
826 | Verifies that two doubles are equal considering a delta. If the | |
|
827 | expected value is infinity then the delta value is ignored. If | |
|
828 | they are not equal then an <see cref="T:NUnit.Framework.AssertionException"/> is | |
|
829 | thrown. | |
|
830 | </summary> | |
|
831 | <param name="expected">The expected value</param> | |
|
832 | <param name="actual">The actual value</param> | |
|
833 | <param name="delta">The maximum acceptable difference between the | |
|
834 | the expected and the actual</param> | |
|
835 | <param name="message">The message to display in case of failure</param> | |
|
836 | </member> | |
|
837 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Double,System.Double,System.Double)"> | |
|
838 | <summary> | |
|
839 | Verifies that two doubles are equal considering a delta. If the | |
|
840 | expected value is infinity then the delta value is ignored. If | |
|
841 | they are not equal then an <see cref="T:NUnit.Framework.AssertionException"/> is | |
|
842 | thrown. | |
|
843 | </summary> | |
|
844 | <param name="expected">The expected value</param> | |
|
845 | <param name="actual">The actual value</param> | |
|
846 | <param name="delta">The maximum acceptable difference between the | |
|
847 | the expected and the actual</param> | |
|
848 | </member> | |
|
849 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Double,System.Nullable{System.Double},System.Double,System.String,System.Object[])"> | |
|
850 | <summary> | |
|
851 | Verifies that two doubles are equal considering a delta. If the | |
|
852 | expected value is infinity then the delta value is ignored. If | |
|
853 | they are not equal then an <see cref="T:NUnit.Framework.AssertionException"/> is | |
|
854 | thrown. | |
|
855 | </summary> | |
|
856 | <param name="expected">The expected value</param> | |
|
857 | <param name="actual">The actual value</param> | |
|
858 | <param name="delta">The maximum acceptable difference between the | |
|
859 | the expected and the actual</param> | |
|
860 | <param name="message">The message to display in case of failure</param> | |
|
861 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
862 | </member> | |
|
863 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Double,System.Nullable{System.Double},System.Double,System.String)"> | |
|
864 | <summary> | |
|
865 | Verifies that two doubles are equal considering a delta. If the | |
|
866 | expected value is infinity then the delta value is ignored. If | |
|
867 | they are not equal then an <see cref="T:NUnit.Framework.AssertionException"/> is | |
|
868 | thrown. | |
|
869 | </summary> | |
|
870 | <param name="expected">The expected value</param> | |
|
871 | <param name="actual">The actual value</param> | |
|
872 | <param name="delta">The maximum acceptable difference between the | |
|
873 | the expected and the actual</param> | |
|
874 | <param name="message">The message to display in case of failure</param> | |
|
875 | </member> | |
|
876 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Double,System.Nullable{System.Double},System.Double)"> | |
|
877 | <summary> | |
|
878 | Verifies that two doubles are equal considering a delta. If the | |
|
879 | expected value is infinity then the delta value is ignored. If | |
|
880 | they are not equal then an <see cref="T:NUnit.Framework.AssertionException"/> is | |
|
881 | thrown. | |
|
882 | </summary> | |
|
883 | <param name="expected">The expected value</param> | |
|
884 | <param name="actual">The actual value</param> | |
|
885 | <param name="delta">The maximum acceptable difference between the | |
|
886 | the expected and the actual</param> | |
|
887 | </member> | |
|
888 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Object,System.Object,System.String,System.Object[])"> | |
|
889 | <summary> | |
|
890 | Verifies that two objects are equal. Two objects are considered | |
|
891 | equal if both are null, or if both have the same value. NUnit | |
|
892 | has special semantics for some object types. | |
|
893 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
894 | </summary> | |
|
895 | <param name="expected">The value that is expected</param> | |
|
896 | <param name="actual">The actual value</param> | |
|
897 | <param name="message">The message to display in case of failure</param> | |
|
898 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
899 | </member> | |
|
900 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Object,System.Object,System.String)"> | |
|
901 | <summary> | |
|
902 | Verifies that two objects are equal. Two objects are considered | |
|
903 | equal if both are null, or if both have the same value. NUnit | |
|
904 | has special semantics for some object types. | |
|
905 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
906 | </summary> | |
|
907 | <param name="expected">The value that is expected</param> | |
|
908 | <param name="actual">The actual value</param> | |
|
909 | <param name="message">The message to display in case of failure</param> | |
|
910 | </member> | |
|
911 | <member name="M:NUnit.Framework.Assert.AreEqual(System.Object,System.Object)"> | |
|
912 | <summary> | |
|
913 | Verifies that two objects are equal. Two objects are considered | |
|
914 | equal if both are null, or if both have the same value. NUnit | |
|
915 | has special semantics for some object types. | |
|
916 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
917 | </summary> | |
|
918 | <param name="expected">The value that is expected</param> | |
|
919 | <param name="actual">The actual value</param> | |
|
920 | </member> | |
|
921 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Int32,System.Int32,System.String,System.Object[])"> | |
|
922 | <summary> | |
|
923 | Verifies that two ints are not equal. If they are equal, then an | |
|
924 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
925 | </summary> | |
|
926 | <param name="expected">The expected value</param> | |
|
927 | <param name="actual">The actual value</param> | |
|
928 | <param name="message">The message to display in case of failure</param> | |
|
929 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
930 | </member> | |
|
931 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Int32,System.Int32,System.String)"> | |
|
932 | <summary> | |
|
933 | Verifies that two ints are not equal. If they are equal, then an | |
|
934 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
935 | </summary> | |
|
936 | <param name="expected">The expected value</param> | |
|
937 | <param name="actual">The actual value</param> | |
|
938 | <param name="message">The message to display in case of failure</param> | |
|
939 | </member> | |
|
940 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Int32,System.Int32)"> | |
|
941 | <summary> | |
|
942 | Verifies that two ints are not equal. If they are equal, then an | |
|
943 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
944 | </summary> | |
|
945 | <param name="expected">The expected value</param> | |
|
946 | <param name="actual">The actual value</param> | |
|
947 | </member> | |
|
948 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Int64,System.Int64,System.String,System.Object[])"> | |
|
949 | <summary> | |
|
950 | Verifies that two longs are not equal. If they are equal, then an | |
|
951 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
952 | </summary> | |
|
953 | <param name="expected">The expected value</param> | |
|
954 | <param name="actual">The actual value</param> | |
|
955 | <param name="message">The message to display in case of failure</param> | |
|
956 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
957 | </member> | |
|
958 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Int64,System.Int64,System.String)"> | |
|
959 | <summary> | |
|
960 | Verifies that two longs are not equal. If they are equal, then an | |
|
961 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
962 | </summary> | |
|
963 | <param name="expected">The expected value</param> | |
|
964 | <param name="actual">The actual value</param> | |
|
965 | <param name="message">The message to display in case of failure</param> | |
|
966 | </member> | |
|
967 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Int64,System.Int64)"> | |
|
968 | <summary> | |
|
969 | Verifies that two longs are not equal. If they are equal, then an | |
|
970 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
971 | </summary> | |
|
972 | <param name="expected">The expected value</param> | |
|
973 | <param name="actual">The actual value</param> | |
|
974 | </member> | |
|
975 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.UInt32,System.UInt32,System.String,System.Object[])"> | |
|
976 | <summary> | |
|
977 | Verifies that two unsigned ints are not equal. If they are equal, then an | |
|
978 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
979 | </summary> | |
|
980 | <param name="expected">The expected value</param> | |
|
981 | <param name="actual">The actual value</param> | |
|
982 | <param name="message">The message to display in case of failure</param> | |
|
983 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
984 | </member> | |
|
985 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.UInt32,System.UInt32,System.String)"> | |
|
986 | <summary> | |
|
987 | Verifies that two unsigned ints are not equal. If they are equal, then an | |
|
988 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
989 | </summary> | |
|
990 | <param name="expected">The expected value</param> | |
|
991 | <param name="actual">The actual value</param> | |
|
992 | <param name="message">The message to display in case of failure</param> | |
|
993 | </member> | |
|
994 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.UInt32,System.UInt32)"> | |
|
995 | <summary> | |
|
996 | Verifies that two unsigned ints are not equal. If they are equal, then an | |
|
997 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
998 | </summary> | |
|
999 | <param name="expected">The expected value</param> | |
|
1000 | <param name="actual">The actual value</param> | |
|
1001 | </member> | |
|
1002 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.UInt64,System.UInt64,System.String,System.Object[])"> | |
|
1003 | <summary> | |
|
1004 | Verifies that two unsigned longs are not equal. If they are equal, then an | |
|
1005 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1006 | </summary> | |
|
1007 | <param name="expected">The expected value</param> | |
|
1008 | <param name="actual">The actual value</param> | |
|
1009 | <param name="message">The message to display in case of failure</param> | |
|
1010 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1011 | </member> | |
|
1012 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.UInt64,System.UInt64,System.String)"> | |
|
1013 | <summary> | |
|
1014 | Verifies that two unsigned longs are not equal. If they are equal, then an | |
|
1015 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1016 | </summary> | |
|
1017 | <param name="expected">The expected value</param> | |
|
1018 | <param name="actual">The actual value</param> | |
|
1019 | <param name="message">The message to display in case of failure</param> | |
|
1020 | </member> | |
|
1021 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.UInt64,System.UInt64)"> | |
|
1022 | <summary> | |
|
1023 | Verifies that two unsigned longs are not equal. If they are equal, then an | |
|
1024 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1025 | </summary> | |
|
1026 | <param name="expected">The expected value</param> | |
|
1027 | <param name="actual">The actual value</param> | |
|
1028 | </member> | |
|
1029 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Decimal,System.Decimal,System.String,System.Object[])"> | |
|
1030 | <summary> | |
|
1031 | Verifies that two decimals are not equal. If they are equal, then an | |
|
1032 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1033 | </summary> | |
|
1034 | <param name="expected">The expected value</param> | |
|
1035 | <param name="actual">The actual value</param> | |
|
1036 | <param name="message">The message to display in case of failure</param> | |
|
1037 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1038 | </member> | |
|
1039 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Decimal,System.Decimal,System.String)"> | |
|
1040 | <summary> | |
|
1041 | Verifies that two decimals are not equal. If they are equal, then an | |
|
1042 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1043 | </summary> | |
|
1044 | <param name="expected">The expected value</param> | |
|
1045 | <param name="actual">The actual value</param> | |
|
1046 | <param name="message">The message to display in case of failure</param> | |
|
1047 | </member> | |
|
1048 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Decimal,System.Decimal)"> | |
|
1049 | <summary> | |
|
1050 | Verifies that two decimals are not equal. If they are equal, then an | |
|
1051 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1052 | </summary> | |
|
1053 | <param name="expected">The expected value</param> | |
|
1054 | <param name="actual">The actual value</param> | |
|
1055 | </member> | |
|
1056 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Single,System.Single,System.String,System.Object[])"> | |
|
1057 | <summary> | |
|
1058 | Verifies that two floats are not equal. If they are equal, then an | |
|
1059 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1060 | </summary> | |
|
1061 | <param name="expected">The expected value</param> | |
|
1062 | <param name="actual">The actual value</param> | |
|
1063 | <param name="message">The message to display in case of failure</param> | |
|
1064 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1065 | </member> | |
|
1066 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Single,System.Single,System.String)"> | |
|
1067 | <summary> | |
|
1068 | Verifies that two floats are not equal. If they are equal, then an | |
|
1069 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1070 | </summary> | |
|
1071 | <param name="expected">The expected value</param> | |
|
1072 | <param name="actual">The actual value</param> | |
|
1073 | <param name="message">The message to display in case of failure</param> | |
|
1074 | </member> | |
|
1075 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Single,System.Single)"> | |
|
1076 | <summary> | |
|
1077 | Verifies that two floats are not equal. If they are equal, then an | |
|
1078 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1079 | </summary> | |
|
1080 | <param name="expected">The expected value</param> | |
|
1081 | <param name="actual">The actual value</param> | |
|
1082 | </member> | |
|
1083 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Double,System.Double,System.String,System.Object[])"> | |
|
1084 | <summary> | |
|
1085 | Verifies that two doubles are not equal. If they are equal, then an | |
|
1086 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1087 | </summary> | |
|
1088 | <param name="expected">The expected value</param> | |
|
1089 | <param name="actual">The actual value</param> | |
|
1090 | <param name="message">The message to display in case of failure</param> | |
|
1091 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1092 | </member> | |
|
1093 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Double,System.Double,System.String)"> | |
|
1094 | <summary> | |
|
1095 | Verifies that two doubles are not equal. If they are equal, then an | |
|
1096 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1097 | </summary> | |
|
1098 | <param name="expected">The expected value</param> | |
|
1099 | <param name="actual">The actual value</param> | |
|
1100 | <param name="message">The message to display in case of failure</param> | |
|
1101 | </member> | |
|
1102 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Double,System.Double)"> | |
|
1103 | <summary> | |
|
1104 | Verifies that two doubles are not equal. If they are equal, then an | |
|
1105 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1106 | </summary> | |
|
1107 | <param name="expected">The expected value</param> | |
|
1108 | <param name="actual">The actual value</param> | |
|
1109 | </member> | |
|
1110 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Object,System.Object,System.String,System.Object[])"> | |
|
1111 | <summary> | |
|
1112 | Verifies that two objects are not equal. Two objects are considered | |
|
1113 | equal if both are null, or if both have the same value. NUnit | |
|
1114 | has special semantics for some object types. | |
|
1115 | If they are equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1116 | </summary> | |
|
1117 | <param name="expected">The value that is expected</param> | |
|
1118 | <param name="actual">The actual value</param> | |
|
1119 | <param name="message">The message to display in case of failure</param> | |
|
1120 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1121 | </member> | |
|
1122 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Object,System.Object,System.String)"> | |
|
1123 | <summary> | |
|
1124 | Verifies that two objects are not equal. Two objects are considered | |
|
1125 | equal if both are null, or if both have the same value. NUnit | |
|
1126 | has special semantics for some object types. | |
|
1127 | If they are equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1128 | </summary> | |
|
1129 | <param name="expected">The value that is expected</param> | |
|
1130 | <param name="actual">The actual value</param> | |
|
1131 | <param name="message">The message to display in case of failure</param> | |
|
1132 | </member> | |
|
1133 | <member name="M:NUnit.Framework.Assert.AreNotEqual(System.Object,System.Object)"> | |
|
1134 | <summary> | |
|
1135 | Verifies that two objects are not equal. Two objects are considered | |
|
1136 | equal if both are null, or if both have the same value. NUnit | |
|
1137 | has special semantics for some object types. | |
|
1138 | If they are equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1139 | </summary> | |
|
1140 | <param name="expected">The value that is expected</param> | |
|
1141 | <param name="actual">The actual value</param> | |
|
1142 | </member> | |
|
1143 | <member name="M:NUnit.Framework.Assert.AreSame(System.Object,System.Object,System.String,System.Object[])"> | |
|
1144 | <summary> | |
|
1145 | Asserts that two objects refer to the same object. If they | |
|
1146 | are not the same an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1147 | </summary> | |
|
1148 | <param name="expected">The expected object</param> | |
|
1149 | <param name="actual">The actual object</param> | |
|
1150 | <param name="message">The message to display in case of failure</param> | |
|
1151 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1152 | </member> | |
|
1153 | <member name="M:NUnit.Framework.Assert.AreSame(System.Object,System.Object,System.String)"> | |
|
1154 | <summary> | |
|
1155 | Asserts that two objects refer to the same object. If they | |
|
1156 | are not the same an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1157 | </summary> | |
|
1158 | <param name="expected">The expected object</param> | |
|
1159 | <param name="actual">The actual object</param> | |
|
1160 | <param name="message">The message to display in case of failure</param> | |
|
1161 | </member> | |
|
1162 | <member name="M:NUnit.Framework.Assert.AreSame(System.Object,System.Object)"> | |
|
1163 | <summary> | |
|
1164 | Asserts that two objects refer to the same object. If they | |
|
1165 | are not the same an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1166 | </summary> | |
|
1167 | <param name="expected">The expected object</param> | |
|
1168 | <param name="actual">The actual object</param> | |
|
1169 | </member> | |
|
1170 | <member name="M:NUnit.Framework.Assert.AreNotSame(System.Object,System.Object,System.String,System.Object[])"> | |
|
1171 | <summary> | |
|
1172 | Asserts that two objects do not refer to the same object. If they | |
|
1173 | are the same an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1174 | </summary> | |
|
1175 | <param name="expected">The expected object</param> | |
|
1176 | <param name="actual">The actual object</param> | |
|
1177 | <param name="message">The message to display in case of failure</param> | |
|
1178 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1179 | </member> | |
|
1180 | <member name="M:NUnit.Framework.Assert.AreNotSame(System.Object,System.Object,System.String)"> | |
|
1181 | <summary> | |
|
1182 | Asserts that two objects do not refer to the same object. If they | |
|
1183 | are the same an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1184 | </summary> | |
|
1185 | <param name="expected">The expected object</param> | |
|
1186 | <param name="actual">The actual object</param> | |
|
1187 | <param name="message">The message to display in case of failure</param> | |
|
1188 | </member> | |
|
1189 | <member name="M:NUnit.Framework.Assert.AreNotSame(System.Object,System.Object)"> | |
|
1190 | <summary> | |
|
1191 | Asserts that two objects do not refer to the same object. If they | |
|
1192 | are the same an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1193 | </summary> | |
|
1194 | <param name="expected">The expected object</param> | |
|
1195 | <param name="actual">The actual object</param> | |
|
1196 | </member> | |
|
1197 | <member name="M:NUnit.Framework.Assert.IsNaN(System.Double,System.String,System.Object[])"> | |
|
1198 | <summary> | |
|
1199 | Verifies that the double that is passed in is an <code>NaN</code> value. | |
|
1200 | If the object is not <code>NaN</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
1201 | is thrown. | |
|
1202 | </summary> | |
|
1203 | <param name="aDouble">The value that is to be tested</param> | |
|
1204 | <param name="message">The message to display in case of failure</param> | |
|
1205 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1206 | </member> | |
|
1207 | <member name="M:NUnit.Framework.Assert.IsNaN(System.Double,System.String)"> | |
|
1208 | <summary> | |
|
1209 | Verifies that the double that is passed in is an <code>NaN</code> value. | |
|
1210 | If the object is not <code>NaN</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
1211 | is thrown. | |
|
1212 | </summary> | |
|
1213 | <param name="aDouble">The value that is to be tested</param> | |
|
1214 | <param name="message">The message to display in case of failure</param> | |
|
1215 | </member> | |
|
1216 | <member name="M:NUnit.Framework.Assert.IsNaN(System.Double)"> | |
|
1217 | <summary> | |
|
1218 | Verifies that the double that is passed in is an <code>NaN</code> value. | |
|
1219 | If the object is not <code>NaN</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
1220 | is thrown. | |
|
1221 | </summary> | |
|
1222 | <param name="aDouble">The value that is to be tested</param> | |
|
1223 | </member> | |
|
1224 | <member name="M:NUnit.Framework.Assert.IsNaN(System.Nullable{System.Double},System.String,System.Object[])"> | |
|
1225 | <summary> | |
|
1226 | Verifies that the double that is passed in is an <code>NaN</code> value. | |
|
1227 | If the object is not <code>NaN</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
1228 | is thrown. | |
|
1229 | </summary> | |
|
1230 | <param name="aDouble">The value that is to be tested</param> | |
|
1231 | <param name="message">The message to display in case of failure</param> | |
|
1232 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1233 | </member> | |
|
1234 | <member name="M:NUnit.Framework.Assert.IsNaN(System.Nullable{System.Double},System.String)"> | |
|
1235 | <summary> | |
|
1236 | Verifies that the double that is passed in is an <code>NaN</code> value. | |
|
1237 | If the object is not <code>NaN</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
1238 | is thrown. | |
|
1239 | </summary> | |
|
1240 | <param name="aDouble">The value that is to be tested</param> | |
|
1241 | <param name="message">The message to display in case of failure</param> | |
|
1242 | </member> | |
|
1243 | <member name="M:NUnit.Framework.Assert.IsNaN(System.Nullable{System.Double})"> | |
|
1244 | <summary> | |
|
1245 | Verifies that the double that is passed in is an <code>NaN</code> value. | |
|
1246 | If the object is not <code>NaN</code> then an <see cref="T:NUnit.Framework.AssertionException"/> | |
|
1247 | is thrown. | |
|
1248 | </summary> | |
|
1249 | <param name="aDouble">The value that is to be tested</param> | |
|
1250 | </member> | |
|
1251 | <member name="M:NUnit.Framework.Assert.IsEmpty(System.String,System.String,System.Object[])"> | |
|
1252 | <summary> | |
|
1253 | Assert that a string is empty - that is equal to string.Empty | |
|
1254 | </summary> | |
|
1255 | <param name="aString">The string to be tested</param> | |
|
1256 | <param name="message">The message to display in case of failure</param> | |
|
1257 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1258 | </member> | |
|
1259 | <member name="M:NUnit.Framework.Assert.IsEmpty(System.String,System.String)"> | |
|
1260 | <summary> | |
|
1261 | Assert that a string is empty - that is equal to string.Empty | |
|
1262 | </summary> | |
|
1263 | <param name="aString">The string to be tested</param> | |
|
1264 | <param name="message">The message to display in case of failure</param> | |
|
1265 | </member> | |
|
1266 | <member name="M:NUnit.Framework.Assert.IsEmpty(System.String)"> | |
|
1267 | <summary> | |
|
1268 | Assert that a string is empty - that is equal to string.Empty | |
|
1269 | </summary> | |
|
1270 | <param name="aString">The string to be tested</param> | |
|
1271 | </member> | |
|
1272 | <member name="M:NUnit.Framework.Assert.IsEmpty(System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
1273 | <summary> | |
|
1274 | Assert that an array, list or other collection is empty | |
|
1275 | </summary> | |
|
1276 | <param name="collection">An array, list or other collection implementing ICollection</param> | |
|
1277 | <param name="message">The message to display in case of failure</param> | |
|
1278 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1279 | </member> | |
|
1280 | <member name="M:NUnit.Framework.Assert.IsEmpty(System.Collections.IEnumerable,System.String)"> | |
|
1281 | <summary> | |
|
1282 | Assert that an array, list or other collection is empty | |
|
1283 | </summary> | |
|
1284 | <param name="collection">An array, list or other collection implementing ICollection</param> | |
|
1285 | <param name="message">The message to display in case of failure</param> | |
|
1286 | </member> | |
|
1287 | <member name="M:NUnit.Framework.Assert.IsEmpty(System.Collections.IEnumerable)"> | |
|
1288 | <summary> | |
|
1289 | Assert that an array, list or other collection is empty | |
|
1290 | </summary> | |
|
1291 | <param name="collection">An array, list or other collection implementing ICollection</param> | |
|
1292 | </member> | |
|
1293 | <member name="M:NUnit.Framework.Assert.IsNotEmpty(System.String,System.String,System.Object[])"> | |
|
1294 | <summary> | |
|
1295 | Assert that a string is not empty - that is not equal to string.Empty | |
|
1296 | </summary> | |
|
1297 | <param name="aString">The string to be tested</param> | |
|
1298 | <param name="message">The message to display in case of failure</param> | |
|
1299 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1300 | </member> | |
|
1301 | <member name="M:NUnit.Framework.Assert.IsNotEmpty(System.String,System.String)"> | |
|
1302 | <summary> | |
|
1303 | Assert that a string is not empty - that is not equal to string.Empty | |
|
1304 | </summary> | |
|
1305 | <param name="aString">The string to be tested</param> | |
|
1306 | <param name="message">The message to display in case of failure</param> | |
|
1307 | </member> | |
|
1308 | <member name="M:NUnit.Framework.Assert.IsNotEmpty(System.String)"> | |
|
1309 | <summary> | |
|
1310 | Assert that a string is not empty - that is not equal to string.Empty | |
|
1311 | </summary> | |
|
1312 | <param name="aString">The string to be tested</param> | |
|
1313 | </member> | |
|
1314 | <member name="M:NUnit.Framework.Assert.IsNotEmpty(System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
1315 | <summary> | |
|
1316 | Assert that an array, list or other collection is not empty | |
|
1317 | </summary> | |
|
1318 | <param name="collection">An array, list or other collection implementing ICollection</param> | |
|
1319 | <param name="message">The message to display in case of failure</param> | |
|
1320 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1321 | </member> | |
|
1322 | <member name="M:NUnit.Framework.Assert.IsNotEmpty(System.Collections.IEnumerable,System.String)"> | |
|
1323 | <summary> | |
|
1324 | Assert that an array, list or other collection is not empty | |
|
1325 | </summary> | |
|
1326 | <param name="collection">An array, list or other collection implementing ICollection</param> | |
|
1327 | <param name="message">The message to display in case of failure</param> | |
|
1328 | </member> | |
|
1329 | <member name="M:NUnit.Framework.Assert.IsNotEmpty(System.Collections.IEnumerable)"> | |
|
1330 | <summary> | |
|
1331 | Assert that an array, list or other collection is not empty | |
|
1332 | </summary> | |
|
1333 | <param name="collection">An array, list or other collection implementing ICollection</param> | |
|
1334 | </member> | |
|
1335 | <member name="M:NUnit.Framework.Assert.IsNullOrEmpty(System.String,System.String,System.Object[])"> | |
|
1336 | <summary> | |
|
1337 | Assert that a string is either null or equal to string.Empty | |
|
1338 | </summary> | |
|
1339 | <param name="aString">The string to be tested</param> | |
|
1340 | <param name="message">The message to display in case of failure</param> | |
|
1341 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1342 | </member> | |
|
1343 | <member name="M:NUnit.Framework.Assert.IsNullOrEmpty(System.String,System.String)"> | |
|
1344 | <summary> | |
|
1345 | Assert that a string is either null or equal to string.Empty | |
|
1346 | </summary> | |
|
1347 | <param name="aString">The string to be tested</param> | |
|
1348 | <param name="message">The message to display in case of failure</param> | |
|
1349 | </member> | |
|
1350 | <member name="M:NUnit.Framework.Assert.IsNullOrEmpty(System.String)"> | |
|
1351 | <summary> | |
|
1352 | Assert that a string is either null or equal to string.Empty | |
|
1353 | </summary> | |
|
1354 | <param name="aString">The string to be tested</param> | |
|
1355 | </member> | |
|
1356 | <member name="M:NUnit.Framework.Assert.IsNotNullOrEmpty(System.String,System.String,System.Object[])"> | |
|
1357 | <summary> | |
|
1358 | Assert that a string is not null or empty | |
|
1359 | </summary> | |
|
1360 | <param name="aString">The string to be tested</param> | |
|
1361 | <param name="message">The message to display in case of failure</param> | |
|
1362 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1363 | </member> | |
|
1364 | <member name="M:NUnit.Framework.Assert.IsNotNullOrEmpty(System.String,System.String)"> | |
|
1365 | <summary> | |
|
1366 | Assert that a string is not null or empty | |
|
1367 | </summary> | |
|
1368 | <param name="aString">The string to be tested</param> | |
|
1369 | <param name="message">The message to display in case of failure</param> | |
|
1370 | </member> | |
|
1371 | <member name="M:NUnit.Framework.Assert.IsNotNullOrEmpty(System.String)"> | |
|
1372 | <summary> | |
|
1373 | Assert that a string is not null or empty | |
|
1374 | </summary> | |
|
1375 | <param name="aString">The string to be tested</param> | |
|
1376 | </member> | |
|
1377 | <member name="M:NUnit.Framework.Assert.IsAssignableFrom(System.Type,System.Object,System.String,System.Object[])"> | |
|
1378 | <summary> | |
|
1379 | Asserts that an object may be assigned a value of a given Type. | |
|
1380 | </summary> | |
|
1381 | <param name="expected">The expected Type.</param> | |
|
1382 | <param name="actual">The object under examination</param> | |
|
1383 | <param name="message">The message to display in case of failure</param> | |
|
1384 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1385 | </member> | |
|
1386 | <member name="M:NUnit.Framework.Assert.IsAssignableFrom(System.Type,System.Object,System.String)"> | |
|
1387 | <summary> | |
|
1388 | Asserts that an object may be assigned a value of a given Type. | |
|
1389 | </summary> | |
|
1390 | <param name="expected">The expected Type.</param> | |
|
1391 | <param name="actual">The object under examination</param> | |
|
1392 | <param name="message">The message to display in case of failure</param> | |
|
1393 | </member> | |
|
1394 | <member name="M:NUnit.Framework.Assert.IsAssignableFrom(System.Type,System.Object)"> | |
|
1395 | <summary> | |
|
1396 | Asserts that an object may be assigned a value of a given Type. | |
|
1397 | </summary> | |
|
1398 | <param name="expected">The expected Type.</param> | |
|
1399 | <param name="actual">The object under examination</param> | |
|
1400 | </member> | |
|
1401 | <member name="M:NUnit.Framework.Assert.IsAssignableFrom``1(System.Object,System.String,System.Object[])"> | |
|
1402 | <summary> | |
|
1403 | Asserts that an object may be assigned a value of a given Type. | |
|
1404 | </summary> | |
|
1405 | <typeparam name="T">The expected Type.</typeparam> | |
|
1406 | <param name="actual">The object under examination</param> | |
|
1407 | <param name="message">The message to display in case of failure</param> | |
|
1408 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1409 | </member> | |
|
1410 | <member name="M:NUnit.Framework.Assert.IsAssignableFrom``1(System.Object,System.String)"> | |
|
1411 | <summary> | |
|
1412 | Asserts that an object may be assigned a value of a given Type. | |
|
1413 | </summary> | |
|
1414 | <typeparam name="T">The expected Type.</typeparam> | |
|
1415 | <param name="actual">The object under examination</param> | |
|
1416 | <param name="message">The message to display in case of failure</param> | |
|
1417 | </member> | |
|
1418 | <member name="M:NUnit.Framework.Assert.IsAssignableFrom``1(System.Object)"> | |
|
1419 | <summary> | |
|
1420 | Asserts that an object may be assigned a value of a given Type. | |
|
1421 | </summary> | |
|
1422 | <typeparam name="T">The expected Type.</typeparam> | |
|
1423 | <param name="actual">The object under examination</param> | |
|
1424 | </member> | |
|
1425 | <member name="M:NUnit.Framework.Assert.IsNotAssignableFrom(System.Type,System.Object,System.String,System.Object[])"> | |
|
1426 | <summary> | |
|
1427 | Asserts that an object may not be assigned a value of a given Type. | |
|
1428 | </summary> | |
|
1429 | <param name="expected">The expected Type.</param> | |
|
1430 | <param name="actual">The object under examination</param> | |
|
1431 | <param name="message">The message to display in case of failure</param> | |
|
1432 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1433 | </member> | |
|
1434 | <member name="M:NUnit.Framework.Assert.IsNotAssignableFrom(System.Type,System.Object,System.String)"> | |
|
1435 | <summary> | |
|
1436 | Asserts that an object may not be assigned a value of a given Type. | |
|
1437 | </summary> | |
|
1438 | <param name="expected">The expected Type.</param> | |
|
1439 | <param name="actual">The object under examination</param> | |
|
1440 | <param name="message">The message to display in case of failure</param> | |
|
1441 | </member> | |
|
1442 | <member name="M:NUnit.Framework.Assert.IsNotAssignableFrom(System.Type,System.Object)"> | |
|
1443 | <summary> | |
|
1444 | Asserts that an object may not be assigned a value of a given Type. | |
|
1445 | </summary> | |
|
1446 | <param name="expected">The expected Type.</param> | |
|
1447 | <param name="actual">The object under examination</param> | |
|
1448 | </member> | |
|
1449 | <member name="M:NUnit.Framework.Assert.IsNotAssignableFrom``1(System.Object,System.String,System.Object[])"> | |
|
1450 | <summary> | |
|
1451 | Asserts that an object may not be assigned a value of a given Type. | |
|
1452 | </summary> | |
|
1453 | <typeparam name="T">The expected Type.</typeparam> | |
|
1454 | <param name="actual">The object under examination</param> | |
|
1455 | <param name="message">The message to display in case of failure</param> | |
|
1456 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1457 | </member> | |
|
1458 | <member name="M:NUnit.Framework.Assert.IsNotAssignableFrom``1(System.Object,System.String)"> | |
|
1459 | <summary> | |
|
1460 | Asserts that an object may not be assigned a value of a given Type. | |
|
1461 | </summary> | |
|
1462 | <typeparam name="T">The expected Type.</typeparam> | |
|
1463 | <param name="actual">The object under examination</param> | |
|
1464 | <param name="message">The message to display in case of failure</param> | |
|
1465 | </member> | |
|
1466 | <member name="M:NUnit.Framework.Assert.IsNotAssignableFrom``1(System.Object)"> | |
|
1467 | <summary> | |
|
1468 | Asserts that an object may not be assigned a value of a given Type. | |
|
1469 | </summary> | |
|
1470 | <typeparam name="T">The expected Type.</typeparam> | |
|
1471 | <param name="actual">The object under examination</param> | |
|
1472 | </member> | |
|
1473 | <member name="M:NUnit.Framework.Assert.IsInstanceOf(System.Type,System.Object,System.String,System.Object[])"> | |
|
1474 | <summary> | |
|
1475 | Asserts that an object is an instance of a given type. | |
|
1476 | </summary> | |
|
1477 | <param name="expected">The expected Type</param> | |
|
1478 | <param name="actual">The object being examined</param> | |
|
1479 | <param name="message">The message to display in case of failure</param> | |
|
1480 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1481 | </member> | |
|
1482 | <member name="M:NUnit.Framework.Assert.IsInstanceOf(System.Type,System.Object,System.String)"> | |
|
1483 | <summary> | |
|
1484 | Asserts that an object is an instance of a given type. | |
|
1485 | </summary> | |
|
1486 | <param name="expected">The expected Type</param> | |
|
1487 | <param name="actual">The object being examined</param> | |
|
1488 | <param name="message">The message to display in case of failure</param> | |
|
1489 | </member> | |
|
1490 | <member name="M:NUnit.Framework.Assert.IsInstanceOf(System.Type,System.Object)"> | |
|
1491 | <summary> | |
|
1492 | Asserts that an object is an instance of a given type. | |
|
1493 | </summary> | |
|
1494 | <param name="expected">The expected Type</param> | |
|
1495 | <param name="actual">The object being examined</param> | |
|
1496 | </member> | |
|
1497 | <member name="M:NUnit.Framework.Assert.IsInstanceOfType(System.Type,System.Object,System.String,System.Object[])"> | |
|
1498 | <summary> | |
|
1499 | Asserts that an object is an instance of a given type. | |
|
1500 | </summary> | |
|
1501 | <param name="expected">The expected Type</param> | |
|
1502 | <param name="actual">The object being examined</param> | |
|
1503 | <param name="message">The message to display in case of failure</param> | |
|
1504 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1505 | </member> | |
|
1506 | <member name="M:NUnit.Framework.Assert.IsInstanceOfType(System.Type,System.Object,System.String)"> | |
|
1507 | <summary> | |
|
1508 | Asserts that an object is an instance of a given type. | |
|
1509 | </summary> | |
|
1510 | <param name="expected">The expected Type</param> | |
|
1511 | <param name="actual">The object being examined</param> | |
|
1512 | <param name="message">The message to display in case of failure</param> | |
|
1513 | </member> | |
|
1514 | <member name="M:NUnit.Framework.Assert.IsInstanceOfType(System.Type,System.Object)"> | |
|
1515 | <summary> | |
|
1516 | Asserts that an object is an instance of a given type. | |
|
1517 | </summary> | |
|
1518 | <param name="expected">The expected Type</param> | |
|
1519 | <param name="actual">The object being examined</param> | |
|
1520 | </member> | |
|
1521 | <member name="M:NUnit.Framework.Assert.IsInstanceOf``1(System.Object,System.String,System.Object[])"> | |
|
1522 | <summary> | |
|
1523 | Asserts that an object is an instance of a given type. | |
|
1524 | </summary> | |
|
1525 | <typeparam name="T">The expected Type</typeparam> | |
|
1526 | <param name="actual">The object being examined</param> | |
|
1527 | <param name="message">The message to display in case of failure</param> | |
|
1528 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1529 | </member> | |
|
1530 | <member name="M:NUnit.Framework.Assert.IsInstanceOf``1(System.Object,System.String)"> | |
|
1531 | <summary> | |
|
1532 | Asserts that an object is an instance of a given type. | |
|
1533 | </summary> | |
|
1534 | <typeparam name="T">The expected Type</typeparam> | |
|
1535 | <param name="actual">The object being examined</param> | |
|
1536 | <param name="message">The message to display in case of failure</param> | |
|
1537 | </member> | |
|
1538 | <member name="M:NUnit.Framework.Assert.IsInstanceOf``1(System.Object)"> | |
|
1539 | <summary> | |
|
1540 | Asserts that an object is an instance of a given type. | |
|
1541 | </summary> | |
|
1542 | <typeparam name="T">The expected Type</typeparam> | |
|
1543 | <param name="actual">The object being examined</param> | |
|
1544 | </member> | |
|
1545 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOf(System.Type,System.Object,System.String,System.Object[])"> | |
|
1546 | <summary> | |
|
1547 | Asserts that an object is not an instance of a given type. | |
|
1548 | </summary> | |
|
1549 | <param name="expected">The expected Type</param> | |
|
1550 | <param name="actual">The object being examined</param> | |
|
1551 | <param name="message">The message to display in case of failure</param> | |
|
1552 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1553 | </member> | |
|
1554 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOf(System.Type,System.Object,System.String)"> | |
|
1555 | <summary> | |
|
1556 | Asserts that an object is not an instance of a given type. | |
|
1557 | </summary> | |
|
1558 | <param name="expected">The expected Type</param> | |
|
1559 | <param name="actual">The object being examined</param> | |
|
1560 | <param name="message">The message to display in case of failure</param> | |
|
1561 | </member> | |
|
1562 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOf(System.Type,System.Object)"> | |
|
1563 | <summary> | |
|
1564 | Asserts that an object is not an instance of a given type. | |
|
1565 | </summary> | |
|
1566 | <param name="expected">The expected Type</param> | |
|
1567 | <param name="actual">The object being examined</param> | |
|
1568 | </member> | |
|
1569 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOfType(System.Type,System.Object,System.String,System.Object[])"> | |
|
1570 | <summary> | |
|
1571 | Asserts that an object is not an instance of a given type. | |
|
1572 | </summary> | |
|
1573 | <param name="expected">The expected Type</param> | |
|
1574 | <param name="actual">The object being examined</param> | |
|
1575 | <param name="message">The message to display in case of failure</param> | |
|
1576 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1577 | </member> | |
|
1578 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOfType(System.Type,System.Object,System.String)"> | |
|
1579 | <summary> | |
|
1580 | Asserts that an object is not an instance of a given type. | |
|
1581 | </summary> | |
|
1582 | <param name="expected">The expected Type</param> | |
|
1583 | <param name="actual">The object being examined</param> | |
|
1584 | <param name="message">The message to display in case of failure</param> | |
|
1585 | </member> | |
|
1586 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOfType(System.Type,System.Object)"> | |
|
1587 | <summary> | |
|
1588 | Asserts that an object is not an instance of a given type. | |
|
1589 | </summary> | |
|
1590 | <param name="expected">The expected Type</param> | |
|
1591 | <param name="actual">The object being examined</param> | |
|
1592 | </member> | |
|
1593 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOf``1(System.Object,System.String,System.Object[])"> | |
|
1594 | <summary> | |
|
1595 | Asserts that an object is not an instance of a given type. | |
|
1596 | </summary> | |
|
1597 | <typeparam name="T">The expected Type</typeparam> | |
|
1598 | <param name="actual">The object being examined</param> | |
|
1599 | <param name="message">The message to display in case of failure</param> | |
|
1600 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1601 | </member> | |
|
1602 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOf``1(System.Object,System.String)"> | |
|
1603 | <summary> | |
|
1604 | Asserts that an object is not an instance of a given type. | |
|
1605 | </summary> | |
|
1606 | <typeparam name="T">The expected Type</typeparam> | |
|
1607 | <param name="actual">The object being examined</param> | |
|
1608 | <param name="message">The message to display in case of failure</param> | |
|
1609 | </member> | |
|
1610 | <member name="M:NUnit.Framework.Assert.IsNotInstanceOf``1(System.Object)"> | |
|
1611 | <summary> | |
|
1612 | Asserts that an object is not an instance of a given type. | |
|
1613 | </summary> | |
|
1614 | <typeparam name="T">The expected Type</typeparam> | |
|
1615 | <param name="actual">The object being examined</param> | |
|
1616 | </member> | |
|
1617 | <member name="M:NUnit.Framework.Assert.Greater(System.Int32,System.Int32,System.String,System.Object[])"> | |
|
1618 | <summary> | |
|
1619 | Verifies that the first value is greater than the second | |
|
1620 | value. If it is not, then an | |
|
1621 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1622 | </summary> | |
|
1623 | <param name="arg1">The first value, expected to be greater</param> | |
|
1624 | <param name="arg2">The second value, expected to be less</param> | |
|
1625 | <param name="message">The message to display in case of failure</param> | |
|
1626 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1627 | </member> | |
|
1628 | <member name="M:NUnit.Framework.Assert.Greater(System.Int32,System.Int32,System.String)"> | |
|
1629 | <summary> | |
|
1630 | Verifies that the first value is greater than the second | |
|
1631 | value. If it is not, then an | |
|
1632 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1633 | </summary> | |
|
1634 | <param name="arg1">The first value, expected to be greater</param> | |
|
1635 | <param name="arg2">The second value, expected to be less</param> | |
|
1636 | <param name="message">The message to display in case of failure</param> | |
|
1637 | </member> | |
|
1638 | <member name="M:NUnit.Framework.Assert.Greater(System.Int32,System.Int32)"> | |
|
1639 | <summary> | |
|
1640 | Verifies that the first value is greater than the second | |
|
1641 | value. If it is not, then an | |
|
1642 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1643 | </summary> | |
|
1644 | <param name="arg1">The first value, expected to be greater</param> | |
|
1645 | <param name="arg2">The second value, expected to be less</param> | |
|
1646 | </member> | |
|
1647 | <member name="M:NUnit.Framework.Assert.Greater(System.UInt32,System.UInt32,System.String,System.Object[])"> | |
|
1648 | <summary> | |
|
1649 | Verifies that the first value is greater than the second | |
|
1650 | value. If it is not, then an | |
|
1651 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1652 | </summary> | |
|
1653 | <param name="arg1">The first value, expected to be greater</param> | |
|
1654 | <param name="arg2">The second value, expected to be less</param> | |
|
1655 | <param name="message">The message to display in case of failure</param> | |
|
1656 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1657 | </member> | |
|
1658 | <member name="M:NUnit.Framework.Assert.Greater(System.UInt32,System.UInt32,System.String)"> | |
|
1659 | <summary> | |
|
1660 | Verifies that the first value is greater than the second | |
|
1661 | value. If it is not, then an | |
|
1662 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1663 | </summary> | |
|
1664 | <param name="arg1">The first value, expected to be greater</param> | |
|
1665 | <param name="arg2">The second value, expected to be less</param> | |
|
1666 | <param name="message">The message to display in case of failure</param> | |
|
1667 | </member> | |
|
1668 | <member name="M:NUnit.Framework.Assert.Greater(System.UInt32,System.UInt32)"> | |
|
1669 | <summary> | |
|
1670 | Verifies that the first value is greater than the second | |
|
1671 | value. If it is not, then an | |
|
1672 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1673 | </summary> | |
|
1674 | <param name="arg1">The first value, expected to be greater</param> | |
|
1675 | <param name="arg2">The second value, expected to be less</param> | |
|
1676 | </member> | |
|
1677 | <member name="M:NUnit.Framework.Assert.Greater(System.Int64,System.Int64,System.String,System.Object[])"> | |
|
1678 | <summary> | |
|
1679 | Verifies that the first value is greater than the second | |
|
1680 | value. If it is not, then an | |
|
1681 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1682 | </summary> | |
|
1683 | <param name="arg1">The first value, expected to be greater</param> | |
|
1684 | <param name="arg2">The second value, expected to be less</param> | |
|
1685 | <param name="message">The message to display in case of failure</param> | |
|
1686 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1687 | </member> | |
|
1688 | <member name="M:NUnit.Framework.Assert.Greater(System.Int64,System.Int64,System.String)"> | |
|
1689 | <summary> | |
|
1690 | Verifies that the first value is greater than the second | |
|
1691 | value. If it is not, then an | |
|
1692 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1693 | </summary> | |
|
1694 | <param name="arg1">The first value, expected to be greater</param> | |
|
1695 | <param name="arg2">The second value, expected to be less</param> | |
|
1696 | <param name="message">The message to display in case of failure</param> | |
|
1697 | </member> | |
|
1698 | <member name="M:NUnit.Framework.Assert.Greater(System.Int64,System.Int64)"> | |
|
1699 | <summary> | |
|
1700 | Verifies that the first value is greater than the second | |
|
1701 | value. If it is not, then an | |
|
1702 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1703 | </summary> | |
|
1704 | <param name="arg1">The first value, expected to be greater</param> | |
|
1705 | <param name="arg2">The second value, expected to be less</param> | |
|
1706 | </member> | |
|
1707 | <member name="M:NUnit.Framework.Assert.Greater(System.UInt64,System.UInt64,System.String,System.Object[])"> | |
|
1708 | <summary> | |
|
1709 | Verifies that the first value is greater than the second | |
|
1710 | value. If it is not, then an | |
|
1711 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1712 | </summary> | |
|
1713 | <param name="arg1">The first value, expected to be greater</param> | |
|
1714 | <param name="arg2">The second value, expected to be less</param> | |
|
1715 | <param name="message">The message to display in case of failure</param> | |
|
1716 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1717 | </member> | |
|
1718 | <member name="M:NUnit.Framework.Assert.Greater(System.UInt64,System.UInt64,System.String)"> | |
|
1719 | <summary> | |
|
1720 | Verifies that the first value is greater than the second | |
|
1721 | value. If it is not, then an | |
|
1722 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1723 | </summary> | |
|
1724 | <param name="arg1">The first value, expected to be greater</param> | |
|
1725 | <param name="arg2">The second value, expected to be less</param> | |
|
1726 | <param name="message">The message to display in case of failure</param> | |
|
1727 | </member> | |
|
1728 | <member name="M:NUnit.Framework.Assert.Greater(System.UInt64,System.UInt64)"> | |
|
1729 | <summary> | |
|
1730 | Verifies that the first value is greater than the second | |
|
1731 | value. If it is not, then an | |
|
1732 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1733 | </summary> | |
|
1734 | <param name="arg1">The first value, expected to be greater</param> | |
|
1735 | <param name="arg2">The second value, expected to be less</param> | |
|
1736 | </member> | |
|
1737 | <member name="M:NUnit.Framework.Assert.Greater(System.Decimal,System.Decimal,System.String,System.Object[])"> | |
|
1738 | <summary> | |
|
1739 | Verifies that the first value is greater than the second | |
|
1740 | value. If it is not, then an | |
|
1741 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1742 | </summary> | |
|
1743 | <param name="arg1">The first value, expected to be greater</param> | |
|
1744 | <param name="arg2">The second value, expected to be less</param> | |
|
1745 | <param name="message">The message to display in case of failure</param> | |
|
1746 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1747 | </member> | |
|
1748 | <member name="M:NUnit.Framework.Assert.Greater(System.Decimal,System.Decimal,System.String)"> | |
|
1749 | <summary> | |
|
1750 | Verifies that the first value is greater than the second | |
|
1751 | value. If it is not, then an | |
|
1752 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1753 | </summary> | |
|
1754 | <param name="arg1">The first value, expected to be greater</param> | |
|
1755 | <param name="arg2">The second value, expected to be less</param> | |
|
1756 | <param name="message">The message to display in case of failure</param> | |
|
1757 | </member> | |
|
1758 | <member name="M:NUnit.Framework.Assert.Greater(System.Decimal,System.Decimal)"> | |
|
1759 | <summary> | |
|
1760 | Verifies that the first value is greater than the second | |
|
1761 | value. If it is not, then an | |
|
1762 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1763 | </summary> | |
|
1764 | <param name="arg1">The first value, expected to be greater</param> | |
|
1765 | <param name="arg2">The second value, expected to be less</param> | |
|
1766 | </member> | |
|
1767 | <member name="M:NUnit.Framework.Assert.Greater(System.Double,System.Double,System.String,System.Object[])"> | |
|
1768 | <summary> | |
|
1769 | Verifies that the first value is greater than the second | |
|
1770 | value. If it is not, then an | |
|
1771 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1772 | </summary> | |
|
1773 | <param name="arg1">The first value, expected to be greater</param> | |
|
1774 | <param name="arg2">The second value, expected to be less</param> | |
|
1775 | <param name="message">The message to display in case of failure</param> | |
|
1776 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1777 | </member> | |
|
1778 | <member name="M:NUnit.Framework.Assert.Greater(System.Double,System.Double,System.String)"> | |
|
1779 | <summary> | |
|
1780 | Verifies that the first value is greater than the second | |
|
1781 | value. If it is not, then an | |
|
1782 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1783 | </summary> | |
|
1784 | <param name="arg1">The first value, expected to be greater</param> | |
|
1785 | <param name="arg2">The second value, expected to be less</param> | |
|
1786 | <param name="message">The message to display in case of failure</param> | |
|
1787 | </member> | |
|
1788 | <member name="M:NUnit.Framework.Assert.Greater(System.Double,System.Double)"> | |
|
1789 | <summary> | |
|
1790 | Verifies that the first value is greater than the second | |
|
1791 | value. If it is not, then an | |
|
1792 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1793 | </summary> | |
|
1794 | <param name="arg1">The first value, expected to be greater</param> | |
|
1795 | <param name="arg2">The second value, expected to be less</param> | |
|
1796 | </member> | |
|
1797 | <member name="M:NUnit.Framework.Assert.Greater(System.Single,System.Single,System.String,System.Object[])"> | |
|
1798 | <summary> | |
|
1799 | Verifies that the first value is greater than the second | |
|
1800 | value. If it is not, then an | |
|
1801 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1802 | </summary> | |
|
1803 | <param name="arg1">The first value, expected to be greater</param> | |
|
1804 | <param name="arg2">The second value, expected to be less</param> | |
|
1805 | <param name="message">The message to display in case of failure</param> | |
|
1806 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1807 | </member> | |
|
1808 | <member name="M:NUnit.Framework.Assert.Greater(System.Single,System.Single,System.String)"> | |
|
1809 | <summary> | |
|
1810 | Verifies that the first value is greater than the second | |
|
1811 | value. If it is not, then an | |
|
1812 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1813 | </summary> | |
|
1814 | <param name="arg1">The first value, expected to be greater</param> | |
|
1815 | <param name="arg2">The second value, expected to be less</param> | |
|
1816 | <param name="message">The message to display in case of failure</param> | |
|
1817 | </member> | |
|
1818 | <member name="M:NUnit.Framework.Assert.Greater(System.Single,System.Single)"> | |
|
1819 | <summary> | |
|
1820 | Verifies that the first value is greater than the second | |
|
1821 | value. If it is not, then an | |
|
1822 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1823 | </summary> | |
|
1824 | <param name="arg1">The first value, expected to be greater</param> | |
|
1825 | <param name="arg2">The second value, expected to be less</param> | |
|
1826 | </member> | |
|
1827 | <member name="M:NUnit.Framework.Assert.Greater(System.IComparable,System.IComparable,System.String,System.Object[])"> | |
|
1828 | <summary> | |
|
1829 | Verifies that the first value is greater than the second | |
|
1830 | value. If it is not, then an | |
|
1831 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1832 | </summary> | |
|
1833 | <param name="arg1">The first value, expected to be greater</param> | |
|
1834 | <param name="arg2">The second value, expected to be less</param> | |
|
1835 | <param name="message">The message to display in case of failure</param> | |
|
1836 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1837 | </member> | |
|
1838 | <member name="M:NUnit.Framework.Assert.Greater(System.IComparable,System.IComparable,System.String)"> | |
|
1839 | <summary> | |
|
1840 | Verifies that the first value is greater than the second | |
|
1841 | value. If it is not, then an | |
|
1842 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1843 | </summary> | |
|
1844 | <param name="arg1">The first value, expected to be greater</param> | |
|
1845 | <param name="arg2">The second value, expected to be less</param> | |
|
1846 | <param name="message">The message to display in case of failure</param> | |
|
1847 | </member> | |
|
1848 | <member name="M:NUnit.Framework.Assert.Greater(System.IComparable,System.IComparable)"> | |
|
1849 | <summary> | |
|
1850 | Verifies that the first value is greater than the second | |
|
1851 | value. If it is not, then an | |
|
1852 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1853 | </summary> | |
|
1854 | <param name="arg1">The first value, expected to be greater</param> | |
|
1855 | <param name="arg2">The second value, expected to be less</param> | |
|
1856 | </member> | |
|
1857 | <member name="M:NUnit.Framework.Assert.Less(System.Int32,System.Int32,System.String,System.Object[])"> | |
|
1858 | <summary> | |
|
1859 | Verifies that the first value is less than the second | |
|
1860 | value. If it is not, then an | |
|
1861 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1862 | </summary> | |
|
1863 | <param name="arg1">The first value, expected to be less</param> | |
|
1864 | <param name="arg2">The second value, expected to be greater</param> | |
|
1865 | <param name="message">The message to display in case of failure</param> | |
|
1866 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1867 | </member> | |
|
1868 | <member name="M:NUnit.Framework.Assert.Less(System.Int32,System.Int32,System.String)"> | |
|
1869 | <summary> | |
|
1870 | Verifies that the first value is less than the second | |
|
1871 | value. If it is not, then an | |
|
1872 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1873 | </summary> | |
|
1874 | <param name="arg1">The first value, expected to be less</param> | |
|
1875 | <param name="arg2">The second value, expected to be greater</param> | |
|
1876 | <param name="message">The message to display in case of failure</param> | |
|
1877 | </member> | |
|
1878 | <member name="M:NUnit.Framework.Assert.Less(System.Int32,System.Int32)"> | |
|
1879 | <summary> | |
|
1880 | Verifies that the first value is less than the second | |
|
1881 | value. If it is not, then an | |
|
1882 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1883 | </summary> | |
|
1884 | <param name="arg1">The first value, expected to be less</param> | |
|
1885 | <param name="arg2">The second value, expected to be greater</param> | |
|
1886 | </member> | |
|
1887 | <member name="M:NUnit.Framework.Assert.Less(System.UInt32,System.UInt32,System.String,System.Object[])"> | |
|
1888 | <summary> | |
|
1889 | Verifies that the first value is less than the second | |
|
1890 | value. If it is not, then an | |
|
1891 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1892 | </summary> | |
|
1893 | <param name="arg1">The first value, expected to be less</param> | |
|
1894 | <param name="arg2">The second value, expected to be greater</param> | |
|
1895 | <param name="message">The message to display in case of failure</param> | |
|
1896 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1897 | </member> | |
|
1898 | <member name="M:NUnit.Framework.Assert.Less(System.UInt32,System.UInt32,System.String)"> | |
|
1899 | <summary> | |
|
1900 | Verifies that the first value is less than the second | |
|
1901 | value. If it is not, then an | |
|
1902 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1903 | </summary> | |
|
1904 | <param name="arg1">The first value, expected to be less</param> | |
|
1905 | <param name="arg2">The second value, expected to be greater</param> | |
|
1906 | <param name="message">The message to display in case of failure</param> | |
|
1907 | </member> | |
|
1908 | <member name="M:NUnit.Framework.Assert.Less(System.UInt32,System.UInt32)"> | |
|
1909 | <summary> | |
|
1910 | Verifies that the first value is less than the second | |
|
1911 | value. If it is not, then an | |
|
1912 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1913 | </summary> | |
|
1914 | <param name="arg1">The first value, expected to be less</param> | |
|
1915 | <param name="arg2">The second value, expected to be greater</param> | |
|
1916 | </member> | |
|
1917 | <member name="M:NUnit.Framework.Assert.Less(System.Int64,System.Int64,System.String,System.Object[])"> | |
|
1918 | <summary> | |
|
1919 | Verifies that the first value is less than the second | |
|
1920 | value. If it is not, then an | |
|
1921 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1922 | </summary> | |
|
1923 | <param name="arg1">The first value, expected to be less</param> | |
|
1924 | <param name="arg2">The second value, expected to be greater</param> | |
|
1925 | <param name="message">The message to display in case of failure</param> | |
|
1926 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1927 | </member> | |
|
1928 | <member name="M:NUnit.Framework.Assert.Less(System.Int64,System.Int64,System.String)"> | |
|
1929 | <summary> | |
|
1930 | Verifies that the first value is less than the second | |
|
1931 | value. If it is not, then an | |
|
1932 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1933 | </summary> | |
|
1934 | <param name="arg1">The first value, expected to be less</param> | |
|
1935 | <param name="arg2">The second value, expected to be greater</param> | |
|
1936 | <param name="message">The message to display in case of failure</param> | |
|
1937 | </member> | |
|
1938 | <member name="M:NUnit.Framework.Assert.Less(System.Int64,System.Int64)"> | |
|
1939 | <summary> | |
|
1940 | Verifies that the first value is less than the second | |
|
1941 | value. If it is not, then an | |
|
1942 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1943 | </summary> | |
|
1944 | <param name="arg1">The first value, expected to be less</param> | |
|
1945 | <param name="arg2">The second value, expected to be greater</param> | |
|
1946 | </member> | |
|
1947 | <member name="M:NUnit.Framework.Assert.Less(System.UInt64,System.UInt64,System.String,System.Object[])"> | |
|
1948 | <summary> | |
|
1949 | Verifies that the first value is less than the second | |
|
1950 | value. If it is not, then an | |
|
1951 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1952 | </summary> | |
|
1953 | <param name="arg1">The first value, expected to be less</param> | |
|
1954 | <param name="arg2">The second value, expected to be greater</param> | |
|
1955 | <param name="message">The message to display in case of failure</param> | |
|
1956 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1957 | </member> | |
|
1958 | <member name="M:NUnit.Framework.Assert.Less(System.UInt64,System.UInt64,System.String)"> | |
|
1959 | <summary> | |
|
1960 | Verifies that the first value is less than the second | |
|
1961 | value. If it is not, then an | |
|
1962 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1963 | </summary> | |
|
1964 | <param name="arg1">The first value, expected to be less</param> | |
|
1965 | <param name="arg2">The second value, expected to be greater</param> | |
|
1966 | <param name="message">The message to display in case of failure</param> | |
|
1967 | </member> | |
|
1968 | <member name="M:NUnit.Framework.Assert.Less(System.UInt64,System.UInt64)"> | |
|
1969 | <summary> | |
|
1970 | Verifies that the first value is less than the second | |
|
1971 | value. If it is not, then an | |
|
1972 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1973 | </summary> | |
|
1974 | <param name="arg1">The first value, expected to be less</param> | |
|
1975 | <param name="arg2">The second value, expected to be greater</param> | |
|
1976 | </member> | |
|
1977 | <member name="M:NUnit.Framework.Assert.Less(System.Decimal,System.Decimal,System.String,System.Object[])"> | |
|
1978 | <summary> | |
|
1979 | Verifies that the first value is less than the second | |
|
1980 | value. If it is not, then an | |
|
1981 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1982 | </summary> | |
|
1983 | <param name="arg1">The first value, expected to be less</param> | |
|
1984 | <param name="arg2">The second value, expected to be greater</param> | |
|
1985 | <param name="message">The message to display in case of failure</param> | |
|
1986 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
1987 | </member> | |
|
1988 | <member name="M:NUnit.Framework.Assert.Less(System.Decimal,System.Decimal,System.String)"> | |
|
1989 | <summary> | |
|
1990 | Verifies that the first value is less than the second | |
|
1991 | value. If it is not, then an | |
|
1992 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
1993 | </summary> | |
|
1994 | <param name="arg1">The first value, expected to be less</param> | |
|
1995 | <param name="arg2">The second value, expected to be greater</param> | |
|
1996 | <param name="message">The message to display in case of failure</param> | |
|
1997 | </member> | |
|
1998 | <member name="M:NUnit.Framework.Assert.Less(System.Decimal,System.Decimal)"> | |
|
1999 | <summary> | |
|
2000 | Verifies that the first value is less than the second | |
|
2001 | value. If it is not, then an | |
|
2002 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2003 | </summary> | |
|
2004 | <param name="arg1">The first value, expected to be less</param> | |
|
2005 | <param name="arg2">The second value, expected to be greater</param> | |
|
2006 | </member> | |
|
2007 | <member name="M:NUnit.Framework.Assert.Less(System.Double,System.Double,System.String,System.Object[])"> | |
|
2008 | <summary> | |
|
2009 | Verifies that the first value is less than the second | |
|
2010 | value. If it is not, then an | |
|
2011 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2012 | </summary> | |
|
2013 | <param name="arg1">The first value, expected to be less</param> | |
|
2014 | <param name="arg2">The second value, expected to be greater</param> | |
|
2015 | <param name="message">The message to display in case of failure</param> | |
|
2016 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2017 | </member> | |
|
2018 | <member name="M:NUnit.Framework.Assert.Less(System.Double,System.Double,System.String)"> | |
|
2019 | <summary> | |
|
2020 | Verifies that the first value is less than the second | |
|
2021 | value. If it is not, then an | |
|
2022 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2023 | </summary> | |
|
2024 | <param name="arg1">The first value, expected to be less</param> | |
|
2025 | <param name="arg2">The second value, expected to be greater</param> | |
|
2026 | <param name="message">The message to display in case of failure</param> | |
|
2027 | </member> | |
|
2028 | <member name="M:NUnit.Framework.Assert.Less(System.Double,System.Double)"> | |
|
2029 | <summary> | |
|
2030 | Verifies that the first value is less than the second | |
|
2031 | value. If it is not, then an | |
|
2032 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2033 | </summary> | |
|
2034 | <param name="arg1">The first value, expected to be less</param> | |
|
2035 | <param name="arg2">The second value, expected to be greater</param> | |
|
2036 | </member> | |
|
2037 | <member name="M:NUnit.Framework.Assert.Less(System.Single,System.Single,System.String,System.Object[])"> | |
|
2038 | <summary> | |
|
2039 | Verifies that the first value is less than the second | |
|
2040 | value. If it is not, then an | |
|
2041 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2042 | </summary> | |
|
2043 | <param name="arg1">The first value, expected to be less</param> | |
|
2044 | <param name="arg2">The second value, expected to be greater</param> | |
|
2045 | <param name="message">The message to display in case of failure</param> | |
|
2046 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2047 | </member> | |
|
2048 | <member name="M:NUnit.Framework.Assert.Less(System.Single,System.Single,System.String)"> | |
|
2049 | <summary> | |
|
2050 | Verifies that the first value is less than the second | |
|
2051 | value. If it is not, then an | |
|
2052 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2053 | </summary> | |
|
2054 | <param name="arg1">The first value, expected to be less</param> | |
|
2055 | <param name="arg2">The second value, expected to be greater</param> | |
|
2056 | <param name="message">The message to display in case of failure</param> | |
|
2057 | </member> | |
|
2058 | <member name="M:NUnit.Framework.Assert.Less(System.Single,System.Single)"> | |
|
2059 | <summary> | |
|
2060 | Verifies that the first value is less than the second | |
|
2061 | value. If it is not, then an | |
|
2062 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2063 | </summary> | |
|
2064 | <param name="arg1">The first value, expected to be less</param> | |
|
2065 | <param name="arg2">The second value, expected to be greater</param> | |
|
2066 | </member> | |
|
2067 | <member name="M:NUnit.Framework.Assert.Less(System.IComparable,System.IComparable,System.String,System.Object[])"> | |
|
2068 | <summary> | |
|
2069 | Verifies that the first value is less than the second | |
|
2070 | value. If it is not, then an | |
|
2071 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2072 | </summary> | |
|
2073 | <param name="arg1">The first value, expected to be less</param> | |
|
2074 | <param name="arg2">The second value, expected to be greater</param> | |
|
2075 | <param name="message">The message to display in case of failure</param> | |
|
2076 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2077 | </member> | |
|
2078 | <member name="M:NUnit.Framework.Assert.Less(System.IComparable,System.IComparable,System.String)"> | |
|
2079 | <summary> | |
|
2080 | Verifies that the first value is less than the second | |
|
2081 | value. If it is not, then an | |
|
2082 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2083 | </summary> | |
|
2084 | <param name="arg1">The first value, expected to be less</param> | |
|
2085 | <param name="arg2">The second value, expected to be greater</param> | |
|
2086 | <param name="message">The message to display in case of failure</param> | |
|
2087 | </member> | |
|
2088 | <member name="M:NUnit.Framework.Assert.Less(System.IComparable,System.IComparable)"> | |
|
2089 | <summary> | |
|
2090 | Verifies that the first value is less than the second | |
|
2091 | value. If it is not, then an | |
|
2092 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2093 | </summary> | |
|
2094 | <param name="arg1">The first value, expected to be less</param> | |
|
2095 | <param name="arg2">The second value, expected to be greater</param> | |
|
2096 | </member> | |
|
2097 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Int32,System.Int32,System.String,System.Object[])"> | |
|
2098 | <summary> | |
|
2099 | Verifies that the first value is greater than or equal tothe second | |
|
2100 | value. If it is not, then an | |
|
2101 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2102 | </summary> | |
|
2103 | <param name="arg1">The first value, expected to be greater</param> | |
|
2104 | <param name="arg2">The second value, expected to be less</param> | |
|
2105 | <param name="message">The message to display in case of failure</param> | |
|
2106 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2107 | </member> | |
|
2108 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Int32,System.Int32,System.String)"> | |
|
2109 | <summary> | |
|
2110 | Verifies that the first value is greater than or equal tothe second | |
|
2111 | value. If it is not, then an | |
|
2112 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2113 | </summary> | |
|
2114 | <param name="arg1">The first value, expected to be greater</param> | |
|
2115 | <param name="arg2">The second value, expected to be less</param> | |
|
2116 | <param name="message">The message to display in case of failure</param> | |
|
2117 | </member> | |
|
2118 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Int32,System.Int32)"> | |
|
2119 | <summary> | |
|
2120 | Verifies that the first value is greater than or equal tothe second | |
|
2121 | value. If it is not, then an | |
|
2122 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2123 | </summary> | |
|
2124 | <param name="arg1">The first value, expected to be greater</param> | |
|
2125 | <param name="arg2">The second value, expected to be less</param> | |
|
2126 | </member> | |
|
2127 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.UInt32,System.UInt32,System.String,System.Object[])"> | |
|
2128 | <summary> | |
|
2129 | Verifies that the first value is greater than or equal tothe second | |
|
2130 | value. If it is not, then an | |
|
2131 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2132 | </summary> | |
|
2133 | <param name="arg1">The first value, expected to be greater</param> | |
|
2134 | <param name="arg2">The second value, expected to be less</param> | |
|
2135 | <param name="message">The message to display in case of failure</param> | |
|
2136 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2137 | </member> | |
|
2138 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.UInt32,System.UInt32,System.String)"> | |
|
2139 | <summary> | |
|
2140 | Verifies that the first value is greater than or equal tothe second | |
|
2141 | value. If it is not, then an | |
|
2142 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2143 | </summary> | |
|
2144 | <param name="arg1">The first value, expected to be greater</param> | |
|
2145 | <param name="arg2">The second value, expected to be less</param> | |
|
2146 | <param name="message">The message to display in case of failure</param> | |
|
2147 | </member> | |
|
2148 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.UInt32,System.UInt32)"> | |
|
2149 | <summary> | |
|
2150 | Verifies that the first value is greater than or equal tothe second | |
|
2151 | value. If it is not, then an | |
|
2152 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2153 | </summary> | |
|
2154 | <param name="arg1">The first value, expected to be greater</param> | |
|
2155 | <param name="arg2">The second value, expected to be less</param> | |
|
2156 | </member> | |
|
2157 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Int64,System.Int64,System.String,System.Object[])"> | |
|
2158 | <summary> | |
|
2159 | Verifies that the first value is greater than or equal tothe second | |
|
2160 | value. If it is not, then an | |
|
2161 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2162 | </summary> | |
|
2163 | <param name="arg1">The first value, expected to be greater</param> | |
|
2164 | <param name="arg2">The second value, expected to be less</param> | |
|
2165 | <param name="message">The message to display in case of failure</param> | |
|
2166 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2167 | </member> | |
|
2168 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Int64,System.Int64,System.String)"> | |
|
2169 | <summary> | |
|
2170 | Verifies that the first value is greater than or equal tothe second | |
|
2171 | value. If it is not, then an | |
|
2172 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2173 | </summary> | |
|
2174 | <param name="arg1">The first value, expected to be greater</param> | |
|
2175 | <param name="arg2">The second value, expected to be less</param> | |
|
2176 | <param name="message">The message to display in case of failure</param> | |
|
2177 | </member> | |
|
2178 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Int64,System.Int64)"> | |
|
2179 | <summary> | |
|
2180 | Verifies that the first value is greater than or equal tothe second | |
|
2181 | value. If it is not, then an | |
|
2182 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2183 | </summary> | |
|
2184 | <param name="arg1">The first value, expected to be greater</param> | |
|
2185 | <param name="arg2">The second value, expected to be less</param> | |
|
2186 | </member> | |
|
2187 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.UInt64,System.UInt64,System.String,System.Object[])"> | |
|
2188 | <summary> | |
|
2189 | Verifies that the first value is greater than or equal tothe second | |
|
2190 | value. If it is not, then an | |
|
2191 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2192 | </summary> | |
|
2193 | <param name="arg1">The first value, expected to be greater</param> | |
|
2194 | <param name="arg2">The second value, expected to be less</param> | |
|
2195 | <param name="message">The message to display in case of failure</param> | |
|
2196 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2197 | </member> | |
|
2198 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.UInt64,System.UInt64,System.String)"> | |
|
2199 | <summary> | |
|
2200 | Verifies that the first value is greater than or equal tothe second | |
|
2201 | value. If it is not, then an | |
|
2202 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2203 | </summary> | |
|
2204 | <param name="arg1">The first value, expected to be greater</param> | |
|
2205 | <param name="arg2">The second value, expected to be less</param> | |
|
2206 | <param name="message">The message to display in case of failure</param> | |
|
2207 | </member> | |
|
2208 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.UInt64,System.UInt64)"> | |
|
2209 | <summary> | |
|
2210 | Verifies that the first value is greater than or equal tothe second | |
|
2211 | value. If it is not, then an | |
|
2212 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2213 | </summary> | |
|
2214 | <param name="arg1">The first value, expected to be greater</param> | |
|
2215 | <param name="arg2">The second value, expected to be less</param> | |
|
2216 | </member> | |
|
2217 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Decimal,System.Decimal,System.String,System.Object[])"> | |
|
2218 | <summary> | |
|
2219 | Verifies that the first value is greater than or equal tothe second | |
|
2220 | value. If it is not, then an | |
|
2221 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2222 | </summary> | |
|
2223 | <param name="arg1">The first value, expected to be greater</param> | |
|
2224 | <param name="arg2">The second value, expected to be less</param> | |
|
2225 | <param name="message">The message to display in case of failure</param> | |
|
2226 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2227 | </member> | |
|
2228 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Decimal,System.Decimal,System.String)"> | |
|
2229 | <summary> | |
|
2230 | Verifies that the first value is greater than or equal tothe second | |
|
2231 | value. If it is not, then an | |
|
2232 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2233 | </summary> | |
|
2234 | <param name="arg1">The first value, expected to be greater</param> | |
|
2235 | <param name="arg2">The second value, expected to be less</param> | |
|
2236 | <param name="message">The message to display in case of failure</param> | |
|
2237 | </member> | |
|
2238 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Decimal,System.Decimal)"> | |
|
2239 | <summary> | |
|
2240 | Verifies that the first value is greater than or equal tothe second | |
|
2241 | value. If it is not, then an | |
|
2242 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2243 | </summary> | |
|
2244 | <param name="arg1">The first value, expected to be greater</param> | |
|
2245 | <param name="arg2">The second value, expected to be less</param> | |
|
2246 | </member> | |
|
2247 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Double,System.Double,System.String,System.Object[])"> | |
|
2248 | <summary> | |
|
2249 | Verifies that the first value is greater than or equal tothe second | |
|
2250 | value. If it is not, then an | |
|
2251 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2252 | </summary> | |
|
2253 | <param name="arg1">The first value, expected to be greater</param> | |
|
2254 | <param name="arg2">The second value, expected to be less</param> | |
|
2255 | <param name="message">The message to display in case of failure</param> | |
|
2256 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2257 | </member> | |
|
2258 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Double,System.Double,System.String)"> | |
|
2259 | <summary> | |
|
2260 | Verifies that the first value is greater than or equal tothe second | |
|
2261 | value. If it is not, then an | |
|
2262 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2263 | </summary> | |
|
2264 | <param name="arg1">The first value, expected to be greater</param> | |
|
2265 | <param name="arg2">The second value, expected to be less</param> | |
|
2266 | <param name="message">The message to display in case of failure</param> | |
|
2267 | </member> | |
|
2268 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Double,System.Double)"> | |
|
2269 | <summary> | |
|
2270 | Verifies that the first value is greater than or equal tothe second | |
|
2271 | value. If it is not, then an | |
|
2272 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2273 | </summary> | |
|
2274 | <param name="arg1">The first value, expected to be greater</param> | |
|
2275 | <param name="arg2">The second value, expected to be less</param> | |
|
2276 | </member> | |
|
2277 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Single,System.Single,System.String,System.Object[])"> | |
|
2278 | <summary> | |
|
2279 | Verifies that the first value is greater than or equal tothe second | |
|
2280 | value. If it is not, then an | |
|
2281 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2282 | </summary> | |
|
2283 | <param name="arg1">The first value, expected to be greater</param> | |
|
2284 | <param name="arg2">The second value, expected to be less</param> | |
|
2285 | <param name="message">The message to display in case of failure</param> | |
|
2286 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2287 | </member> | |
|
2288 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Single,System.Single,System.String)"> | |
|
2289 | <summary> | |
|
2290 | Verifies that the first value is greater than or equal tothe second | |
|
2291 | value. If it is not, then an | |
|
2292 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2293 | </summary> | |
|
2294 | <param name="arg1">The first value, expected to be greater</param> | |
|
2295 | <param name="arg2">The second value, expected to be less</param> | |
|
2296 | <param name="message">The message to display in case of failure</param> | |
|
2297 | </member> | |
|
2298 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.Single,System.Single)"> | |
|
2299 | <summary> | |
|
2300 | Verifies that the first value is greater than or equal tothe second | |
|
2301 | value. If it is not, then an | |
|
2302 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2303 | </summary> | |
|
2304 | <param name="arg1">The first value, expected to be greater</param> | |
|
2305 | <param name="arg2">The second value, expected to be less</param> | |
|
2306 | </member> | |
|
2307 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.IComparable,System.IComparable,System.String,System.Object[])"> | |
|
2308 | <summary> | |
|
2309 | Verifies that the first value is greater than or equal tothe second | |
|
2310 | value. If it is not, then an | |
|
2311 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2312 | </summary> | |
|
2313 | <param name="arg1">The first value, expected to be greater</param> | |
|
2314 | <param name="arg2">The second value, expected to be less</param> | |
|
2315 | <param name="message">The message to display in case of failure</param> | |
|
2316 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2317 | </member> | |
|
2318 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.IComparable,System.IComparable,System.String)"> | |
|
2319 | <summary> | |
|
2320 | Verifies that the first value is greater than or equal tothe second | |
|
2321 | value. If it is not, then an | |
|
2322 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2323 | </summary> | |
|
2324 | <param name="arg1">The first value, expected to be greater</param> | |
|
2325 | <param name="arg2">The second value, expected to be less</param> | |
|
2326 | <param name="message">The message to display in case of failure</param> | |
|
2327 | </member> | |
|
2328 | <member name="M:NUnit.Framework.Assert.GreaterOrEqual(System.IComparable,System.IComparable)"> | |
|
2329 | <summary> | |
|
2330 | Verifies that the first value is greater than or equal tothe second | |
|
2331 | value. If it is not, then an | |
|
2332 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2333 | </summary> | |
|
2334 | <param name="arg1">The first value, expected to be greater</param> | |
|
2335 | <param name="arg2">The second value, expected to be less</param> | |
|
2336 | </member> | |
|
2337 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Int32,System.Int32,System.String,System.Object[])"> | |
|
2338 | <summary> | |
|
2339 | Verifies that the first value is less than or equal to the second | |
|
2340 | value. If it is not, then an | |
|
2341 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2342 | </summary> | |
|
2343 | <param name="arg1">The first value, expected to be less</param> | |
|
2344 | <param name="arg2">The second value, expected to be greater</param> | |
|
2345 | <param name="message">The message to display in case of failure</param> | |
|
2346 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2347 | </member> | |
|
2348 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Int32,System.Int32,System.String)"> | |
|
2349 | <summary> | |
|
2350 | Verifies that the first value is less than or equal to the second | |
|
2351 | value. If it is not, then an | |
|
2352 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2353 | </summary> | |
|
2354 | <param name="arg1">The first value, expected to be less</param> | |
|
2355 | <param name="arg2">The second value, expected to be greater</param> | |
|
2356 | <param name="message">The message to display in case of failure</param> | |
|
2357 | </member> | |
|
2358 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Int32,System.Int32)"> | |
|
2359 | <summary> | |
|
2360 | Verifies that the first value is less than or equal to the second | |
|
2361 | value. If it is not, then an | |
|
2362 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2363 | </summary> | |
|
2364 | <param name="arg1">The first value, expected to be less</param> | |
|
2365 | <param name="arg2">The second value, expected to be greater</param> | |
|
2366 | </member> | |
|
2367 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.UInt32,System.UInt32,System.String,System.Object[])"> | |
|
2368 | <summary> | |
|
2369 | Verifies that the first value is less than or equal to the second | |
|
2370 | value. If it is not, then an | |
|
2371 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2372 | </summary> | |
|
2373 | <param name="arg1">The first value, expected to be less</param> | |
|
2374 | <param name="arg2">The second value, expected to be greater</param> | |
|
2375 | <param name="message">The message to display in case of failure</param> | |
|
2376 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2377 | </member> | |
|
2378 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.UInt32,System.UInt32,System.String)"> | |
|
2379 | <summary> | |
|
2380 | Verifies that the first value is less than or equal to the second | |
|
2381 | value. If it is not, then an | |
|
2382 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2383 | </summary> | |
|
2384 | <param name="arg1">The first value, expected to be less</param> | |
|
2385 | <param name="arg2">The second value, expected to be greater</param> | |
|
2386 | <param name="message">The message to display in case of failure</param> | |
|
2387 | </member> | |
|
2388 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.UInt32,System.UInt32)"> | |
|
2389 | <summary> | |
|
2390 | Verifies that the first value is less than or equal to the second | |
|
2391 | value. If it is not, then an | |
|
2392 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2393 | </summary> | |
|
2394 | <param name="arg1">The first value, expected to be less</param> | |
|
2395 | <param name="arg2">The second value, expected to be greater</param> | |
|
2396 | </member> | |
|
2397 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Int64,System.Int64,System.String,System.Object[])"> | |
|
2398 | <summary> | |
|
2399 | Verifies that the first value is less than or equal to the second | |
|
2400 | value. If it is not, then an | |
|
2401 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2402 | </summary> | |
|
2403 | <param name="arg1">The first value, expected to be less</param> | |
|
2404 | <param name="arg2">The second value, expected to be greater</param> | |
|
2405 | <param name="message">The message to display in case of failure</param> | |
|
2406 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2407 | </member> | |
|
2408 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Int64,System.Int64,System.String)"> | |
|
2409 | <summary> | |
|
2410 | Verifies that the first value is less than or equal to the second | |
|
2411 | value. If it is not, then an | |
|
2412 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2413 | </summary> | |
|
2414 | <param name="arg1">The first value, expected to be less</param> | |
|
2415 | <param name="arg2">The second value, expected to be greater</param> | |
|
2416 | <param name="message">The message to display in case of failure</param> | |
|
2417 | </member> | |
|
2418 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Int64,System.Int64)"> | |
|
2419 | <summary> | |
|
2420 | Verifies that the first value is less than or equal to the second | |
|
2421 | value. If it is not, then an | |
|
2422 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2423 | </summary> | |
|
2424 | <param name="arg1">The first value, expected to be less</param> | |
|
2425 | <param name="arg2">The second value, expected to be greater</param> | |
|
2426 | </member> | |
|
2427 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.UInt64,System.UInt64,System.String,System.Object[])"> | |
|
2428 | <summary> | |
|
2429 | Verifies that the first value is less than or equal to the second | |
|
2430 | value. If it is not, then an | |
|
2431 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2432 | </summary> | |
|
2433 | <param name="arg1">The first value, expected to be less</param> | |
|
2434 | <param name="arg2">The second value, expected to be greater</param> | |
|
2435 | <param name="message">The message to display in case of failure</param> | |
|
2436 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2437 | </member> | |
|
2438 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.UInt64,System.UInt64,System.String)"> | |
|
2439 | <summary> | |
|
2440 | Verifies that the first value is less than or equal to the second | |
|
2441 | value. If it is not, then an | |
|
2442 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2443 | </summary> | |
|
2444 | <param name="arg1">The first value, expected to be less</param> | |
|
2445 | <param name="arg2">The second value, expected to be greater</param> | |
|
2446 | <param name="message">The message to display in case of failure</param> | |
|
2447 | </member> | |
|
2448 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.UInt64,System.UInt64)"> | |
|
2449 | <summary> | |
|
2450 | Verifies that the first value is less than or equal to the second | |
|
2451 | value. If it is not, then an | |
|
2452 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2453 | </summary> | |
|
2454 | <param name="arg1">The first value, expected to be less</param> | |
|
2455 | <param name="arg2">The second value, expected to be greater</param> | |
|
2456 | </member> | |
|
2457 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Decimal,System.Decimal,System.String,System.Object[])"> | |
|
2458 | <summary> | |
|
2459 | Verifies that the first value is less than or equal to the second | |
|
2460 | value. If it is not, then an | |
|
2461 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2462 | </summary> | |
|
2463 | <param name="arg1">The first value, expected to be less</param> | |
|
2464 | <param name="arg2">The second value, expected to be greater</param> | |
|
2465 | <param name="message">The message to display in case of failure</param> | |
|
2466 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2467 | </member> | |
|
2468 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Decimal,System.Decimal,System.String)"> | |
|
2469 | <summary> | |
|
2470 | Verifies that the first value is less than or equal to the second | |
|
2471 | value. If it is not, then an | |
|
2472 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2473 | </summary> | |
|
2474 | <param name="arg1">The first value, expected to be less</param> | |
|
2475 | <param name="arg2">The second value, expected to be greater</param> | |
|
2476 | <param name="message">The message to display in case of failure</param> | |
|
2477 | </member> | |
|
2478 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Decimal,System.Decimal)"> | |
|
2479 | <summary> | |
|
2480 | Verifies that the first value is less than or equal to the second | |
|
2481 | value. If it is not, then an | |
|
2482 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2483 | </summary> | |
|
2484 | <param name="arg1">The first value, expected to be less</param> | |
|
2485 | <param name="arg2">The second value, expected to be greater</param> | |
|
2486 | </member> | |
|
2487 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Double,System.Double,System.String,System.Object[])"> | |
|
2488 | <summary> | |
|
2489 | Verifies that the first value is less than or equal to the second | |
|
2490 | value. If it is not, then an | |
|
2491 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2492 | </summary> | |
|
2493 | <param name="arg1">The first value, expected to be less</param> | |
|
2494 | <param name="arg2">The second value, expected to be greater</param> | |
|
2495 | <param name="message">The message to display in case of failure</param> | |
|
2496 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2497 | </member> | |
|
2498 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Double,System.Double,System.String)"> | |
|
2499 | <summary> | |
|
2500 | Verifies that the first value is less than or equal to the second | |
|
2501 | value. If it is not, then an | |
|
2502 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2503 | </summary> | |
|
2504 | <param name="arg1">The first value, expected to be less</param> | |
|
2505 | <param name="arg2">The second value, expected to be greater</param> | |
|
2506 | <param name="message">The message to display in case of failure</param> | |
|
2507 | </member> | |
|
2508 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Double,System.Double)"> | |
|
2509 | <summary> | |
|
2510 | Verifies that the first value is less than or equal to the second | |
|
2511 | value. If it is not, then an | |
|
2512 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2513 | </summary> | |
|
2514 | <param name="arg1">The first value, expected to be less</param> | |
|
2515 | <param name="arg2">The second value, expected to be greater</param> | |
|
2516 | </member> | |
|
2517 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Single,System.Single,System.String,System.Object[])"> | |
|
2518 | <summary> | |
|
2519 | Verifies that the first value is less than or equal to the second | |
|
2520 | value. If it is not, then an | |
|
2521 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2522 | </summary> | |
|
2523 | <param name="arg1">The first value, expected to be less</param> | |
|
2524 | <param name="arg2">The second value, expected to be greater</param> | |
|
2525 | <param name="message">The message to display in case of failure</param> | |
|
2526 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2527 | </member> | |
|
2528 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Single,System.Single,System.String)"> | |
|
2529 | <summary> | |
|
2530 | Verifies that the first value is less than or equal to the second | |
|
2531 | value. If it is not, then an | |
|
2532 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2533 | </summary> | |
|
2534 | <param name="arg1">The first value, expected to be less</param> | |
|
2535 | <param name="arg2">The second value, expected to be greater</param> | |
|
2536 | <param name="message">The message to display in case of failure</param> | |
|
2537 | </member> | |
|
2538 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.Single,System.Single)"> | |
|
2539 | <summary> | |
|
2540 | Verifies that the first value is less than or equal to the second | |
|
2541 | value. If it is not, then an | |
|
2542 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2543 | </summary> | |
|
2544 | <param name="arg1">The first value, expected to be less</param> | |
|
2545 | <param name="arg2">The second value, expected to be greater</param> | |
|
2546 | </member> | |
|
2547 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.IComparable,System.IComparable,System.String,System.Object[])"> | |
|
2548 | <summary> | |
|
2549 | Verifies that the first value is less than or equal to the second | |
|
2550 | value. If it is not, then an | |
|
2551 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2552 | </summary> | |
|
2553 | <param name="arg1">The first value, expected to be less</param> | |
|
2554 | <param name="arg2">The second value, expected to be greater</param> | |
|
2555 | <param name="message">The message to display in case of failure</param> | |
|
2556 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2557 | </member> | |
|
2558 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.IComparable,System.IComparable,System.String)"> | |
|
2559 | <summary> | |
|
2560 | Verifies that the first value is less than or equal to the second | |
|
2561 | value. If it is not, then an | |
|
2562 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2563 | </summary> | |
|
2564 | <param name="arg1">The first value, expected to be less</param> | |
|
2565 | <param name="arg2">The second value, expected to be greater</param> | |
|
2566 | <param name="message">The message to display in case of failure</param> | |
|
2567 | </member> | |
|
2568 | <member name="M:NUnit.Framework.Assert.LessOrEqual(System.IComparable,System.IComparable)"> | |
|
2569 | <summary> | |
|
2570 | Verifies that the first value is less than or equal to the second | |
|
2571 | value. If it is not, then an | |
|
2572 | <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
2573 | </summary> | |
|
2574 | <param name="arg1">The first value, expected to be less</param> | |
|
2575 | <param name="arg2">The second value, expected to be greater</param> | |
|
2576 | </member> | |
|
2577 | <member name="M:NUnit.Framework.Assert.Contains(System.Object,System.Collections.ICollection,System.String,System.Object[])"> | |
|
2578 | <summary> | |
|
2579 | Asserts that an object is contained in a list. | |
|
2580 | </summary> | |
|
2581 | <param name="expected">The expected object</param> | |
|
2582 | <param name="actual">The list to be examined</param> | |
|
2583 | <param name="message">The message to display in case of failure</param> | |
|
2584 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2585 | </member> | |
|
2586 | <member name="M:NUnit.Framework.Assert.Contains(System.Object,System.Collections.ICollection,System.String)"> | |
|
2587 | <summary> | |
|
2588 | Asserts that an object is contained in a list. | |
|
2589 | </summary> | |
|
2590 | <param name="expected">The expected object</param> | |
|
2591 | <param name="actual">The list to be examined</param> | |
|
2592 | <param name="message">The message to display in case of failure</param> | |
|
2593 | </member> | |
|
2594 | <member name="M:NUnit.Framework.Assert.Contains(System.Object,System.Collections.ICollection)"> | |
|
2595 | <summary> | |
|
2596 | Asserts that an object is contained in a list. | |
|
2597 | </summary> | |
|
2598 | <param name="expected">The expected object</param> | |
|
2599 | <param name="actual">The list to be examined</param> | |
|
2600 | </member> | |
|
2601 | <member name="M:NUnit.Framework.Assert.AssertDoublesAreEqual(System.Double,System.Double,System.Double,System.String,System.Object[])"> | |
|
2602 | <summary> | |
|
2603 | Helper for Assert.AreEqual(double expected, double actual, ...) | |
|
2604 | allowing code generation to work consistently. | |
|
2605 | </summary> | |
|
2606 | <param name="expected">The expected value</param> | |
|
2607 | <param name="actual">The actual value</param> | |
|
2608 | <param name="delta">The maximum acceptable difference between the | |
|
2609 | the expected and the actual</param> | |
|
2610 | <param name="message">The message to display in case of failure</param> | |
|
2611 | <param name="args">Array of objects to be used in formatting the message</param> | |
|
2612 | </member> | |
|
2613 | <member name="P:NUnit.Framework.Assert.Counter"> | |
|
2614 | <summary> | |
|
2615 | Gets the number of assertions executed so far and | |
|
2616 | resets the counter to zero. | |
|
2617 | </summary> | |
|
2618 | </member> | |
|
2619 | <member name="T:NUnit.Framework.AssertionHelper"> | |
|
2620 | <summary> | |
|
2621 | AssertionHelper is an optional base class for user tests, | |
|
2622 | allowing the use of shorter names for constraints and | |
|
2623 | asserts and avoiding conflict with the definition of | |
|
2624 | <see cref="T:NUnit.Framework.Is"/>, from which it inherits much of its | |
|
2625 | behavior, in certain mock object frameworks. | |
|
2626 | </summary> | |
|
2627 | </member> | |
|
2628 | <member name="T:NUnit.Framework.Constraints.ConstraintFactory"> | |
|
2629 | <summary> | |
|
2630 | Helper class with properties and methods that supply | |
|
2631 | a number of constraints used in Asserts. | |
|
2632 | </summary> | |
|
2633 | </member> | |
|
2634 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.Exactly(System.Int32)"> | |
|
2635 | <summary> | |
|
2636 | Returns a ConstraintExpression, which will apply | |
|
2637 | the following constraint to all members of a collection, | |
|
2638 | succeeding only if a specified number of them succeed. | |
|
2639 | </summary> | |
|
2640 | </member> | |
|
2641 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.Property(System.String)"> | |
|
2642 | <summary> | |
|
2643 | Returns a new PropertyConstraintExpression, which will either | |
|
2644 | test for the existence of the named property on the object | |
|
2645 | being tested or apply any following constraint to that property. | |
|
2646 | </summary> | |
|
2647 | </member> | |
|
2648 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.Attribute(System.Type)"> | |
|
2649 | <summary> | |
|
2650 | Returns a new AttributeConstraint checking for the | |
|
2651 | presence of a particular attribute on an object. | |
|
2652 | </summary> | |
|
2653 | </member> | |
|
2654 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.Attribute``1"> | |
|
2655 | <summary> | |
|
2656 | Returns a new AttributeConstraint checking for the | |
|
2657 | presence of a particular attribute on an object. | |
|
2658 | </summary> | |
|
2659 | </member> | |
|
2660 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.EqualTo(System.Object)"> | |
|
2661 | <summary> | |
|
2662 | Returns a constraint that tests two items for equality | |
|
2663 | </summary> | |
|
2664 | </member> | |
|
2665 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.SameAs(System.Object)"> | |
|
2666 | <summary> | |
|
2667 | Returns a constraint that tests that two references are the same object | |
|
2668 | </summary> | |
|
2669 | </member> | |
|
2670 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.GreaterThan(System.Object)"> | |
|
2671 | <summary> | |
|
2672 | Returns a constraint that tests whether the | |
|
2673 | actual value is greater than the suppled argument | |
|
2674 | </summary> | |
|
2675 | </member> | |
|
2676 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.GreaterThanOrEqualTo(System.Object)"> | |
|
2677 | <summary> | |
|
2678 | Returns a constraint that tests whether the | |
|
2679 | actual value is greater than or equal to the suppled argument | |
|
2680 | </summary> | |
|
2681 | </member> | |
|
2682 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.AtLeast(System.Object)"> | |
|
2683 | <summary> | |
|
2684 | Returns a constraint that tests whether the | |
|
2685 | actual value is greater than or equal to the suppled argument | |
|
2686 | </summary> | |
|
2687 | </member> | |
|
2688 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.LessThan(System.Object)"> | |
|
2689 | <summary> | |
|
2690 | Returns a constraint that tests whether the | |
|
2691 | actual value is less than the suppled argument | |
|
2692 | </summary> | |
|
2693 | </member> | |
|
2694 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.LessThanOrEqualTo(System.Object)"> | |
|
2695 | <summary> | |
|
2696 | Returns a constraint that tests whether the | |
|
2697 | actual value is less than or equal to the suppled argument | |
|
2698 | </summary> | |
|
2699 | </member> | |
|
2700 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.AtMost(System.Object)"> | |
|
2701 | <summary> | |
|
2702 | Returns a constraint that tests whether the | |
|
2703 | actual value is less than or equal to the suppled argument | |
|
2704 | </summary> | |
|
2705 | </member> | |
|
2706 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.TypeOf(System.Type)"> | |
|
2707 | <summary> | |
|
2708 | Returns a constraint that tests whether the actual | |
|
2709 | value is of the exact type supplied as an argument. | |
|
2710 | </summary> | |
|
2711 | </member> | |
|
2712 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.TypeOf``1"> | |
|
2713 | <summary> | |
|
2714 | Returns a constraint that tests whether the actual | |
|
2715 | value is of the exact type supplied as an argument. | |
|
2716 | </summary> | |
|
2717 | </member> | |
|
2718 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.InstanceOf(System.Type)"> | |
|
2719 | <summary> | |
|
2720 | Returns a constraint that tests whether the actual value | |
|
2721 | is of the type supplied as an argument or a derived type. | |
|
2722 | </summary> | |
|
2723 | </member> | |
|
2724 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.InstanceOf``1"> | |
|
2725 | <summary> | |
|
2726 | Returns a constraint that tests whether the actual value | |
|
2727 | is of the type supplied as an argument or a derived type. | |
|
2728 | </summary> | |
|
2729 | </member> | |
|
2730 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.InstanceOfType(System.Type)"> | |
|
2731 | <summary> | |
|
2732 | Returns a constraint that tests whether the actual value | |
|
2733 | is of the type supplied as an argument or a derived type. | |
|
2734 | </summary> | |
|
2735 | </member> | |
|
2736 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.InstanceOfType``1"> | |
|
2737 | <summary> | |
|
2738 | Returns a constraint that tests whether the actual value | |
|
2739 | is of the type supplied as an argument or a derived type. | |
|
2740 | </summary> | |
|
2741 | </member> | |
|
2742 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.AssignableFrom(System.Type)"> | |
|
2743 | <summary> | |
|
2744 | Returns a constraint that tests whether the actual value | |
|
2745 | is assignable from the type supplied as an argument. | |
|
2746 | </summary> | |
|
2747 | </member> | |
|
2748 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.AssignableFrom``1"> | |
|
2749 | <summary> | |
|
2750 | Returns a constraint that tests whether the actual value | |
|
2751 | is assignable from the type supplied as an argument. | |
|
2752 | </summary> | |
|
2753 | </member> | |
|
2754 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.AssignableTo(System.Type)"> | |
|
2755 | <summary> | |
|
2756 | Returns a constraint that tests whether the actual value | |
|
2757 | is assignable from the type supplied as an argument. | |
|
2758 | </summary> | |
|
2759 | </member> | |
|
2760 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.AssignableTo``1"> | |
|
2761 | <summary> | |
|
2762 | Returns a constraint that tests whether the actual value | |
|
2763 | is assignable from the type supplied as an argument. | |
|
2764 | </summary> | |
|
2765 | </member> | |
|
2766 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.EquivalentTo(System.Collections.IEnumerable)"> | |
|
2767 | <summary> | |
|
2768 | Returns a constraint that tests whether the actual value | |
|
2769 | is a collection containing the same elements as the | |
|
2770 | collection supplied as an argument. | |
|
2771 | </summary> | |
|
2772 | </member> | |
|
2773 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.SubsetOf(System.Collections.IEnumerable)"> | |
|
2774 | <summary> | |
|
2775 | Returns a constraint that tests whether the actual value | |
|
2776 | is a subset of the collection supplied as an argument. | |
|
2777 | </summary> | |
|
2778 | </member> | |
|
2779 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.Member(System.Object)"> | |
|
2780 | <summary> | |
|
2781 | Returns a new CollectionContainsConstraint checking for the | |
|
2782 | presence of a particular object in the collection. | |
|
2783 | </summary> | |
|
2784 | </member> | |
|
2785 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.Contains(System.Object)"> | |
|
2786 | <summary> | |
|
2787 | Returns a new CollectionContainsConstraint checking for the | |
|
2788 | presence of a particular object in the collection. | |
|
2789 | </summary> | |
|
2790 | </member> | |
|
2791 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.Contains(System.String)"> | |
|
2792 | <summary> | |
|
2793 | Returns a new ContainsConstraint. This constraint | |
|
2794 | will, in turn, make use of the appropriate second-level | |
|
2795 | constraint, depending on the type of the actual argument. | |
|
2796 | This overload is only used if the item sought is a string, | |
|
2797 | since any other type implies that we are looking for a | |
|
2798 | collection member. | |
|
2799 | </summary> | |
|
2800 | </member> | |
|
2801 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.StringContaining(System.String)"> | |
|
2802 | <summary> | |
|
2803 | Returns a constraint that succeeds if the actual | |
|
2804 | value contains the substring supplied as an argument. | |
|
2805 | </summary> | |
|
2806 | </member> | |
|
2807 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.ContainsSubstring(System.String)"> | |
|
2808 | <summary> | |
|
2809 | Returns a constraint that succeeds if the actual | |
|
2810 | value contains the substring supplied as an argument. | |
|
2811 | </summary> | |
|
2812 | </member> | |
|
2813 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.DoesNotContain(System.String)"> | |
|
2814 | <summary> | |
|
2815 | Returns a constraint that fails if the actual | |
|
2816 | value contains the substring supplied as an argument. | |
|
2817 | </summary> | |
|
2818 | </member> | |
|
2819 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.StartsWith(System.String)"> | |
|
2820 | <summary> | |
|
2821 | Returns a constraint that succeeds if the actual | |
|
2822 | value starts with the substring supplied as an argument. | |
|
2823 | </summary> | |
|
2824 | </member> | |
|
2825 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.StringStarting(System.String)"> | |
|
2826 | <summary> | |
|
2827 | Returns a constraint that succeeds if the actual | |
|
2828 | value starts with the substring supplied as an argument. | |
|
2829 | </summary> | |
|
2830 | </member> | |
|
2831 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.DoesNotStartWith(System.String)"> | |
|
2832 | <summary> | |
|
2833 | Returns a constraint that fails if the actual | |
|
2834 | value starts with the substring supplied as an argument. | |
|
2835 | </summary> | |
|
2836 | </member> | |
|
2837 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.EndsWith(System.String)"> | |
|
2838 | <summary> | |
|
2839 | Returns a constraint that succeeds if the actual | |
|
2840 | value ends with the substring supplied as an argument. | |
|
2841 | </summary> | |
|
2842 | </member> | |
|
2843 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.StringEnding(System.String)"> | |
|
2844 | <summary> | |
|
2845 | Returns a constraint that succeeds if the actual | |
|
2846 | value ends with the substring supplied as an argument. | |
|
2847 | </summary> | |
|
2848 | </member> | |
|
2849 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.DoesNotEndWith(System.String)"> | |
|
2850 | <summary> | |
|
2851 | Returns a constraint that fails if the actual | |
|
2852 | value ends with the substring supplied as an argument. | |
|
2853 | </summary> | |
|
2854 | </member> | |
|
2855 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.Matches(System.String)"> | |
|
2856 | <summary> | |
|
2857 | Returns a constraint that succeeds if the actual | |
|
2858 | value matches the regular expression supplied as an argument. | |
|
2859 | </summary> | |
|
2860 | </member> | |
|
2861 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.StringMatching(System.String)"> | |
|
2862 | <summary> | |
|
2863 | Returns a constraint that succeeds if the actual | |
|
2864 | value matches the regular expression supplied as an argument. | |
|
2865 | </summary> | |
|
2866 | </member> | |
|
2867 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.DoesNotMatch(System.String)"> | |
|
2868 | <summary> | |
|
2869 | Returns a constraint that fails if the actual | |
|
2870 | value matches the pattern supplied as an argument. | |
|
2871 | </summary> | |
|
2872 | </member> | |
|
2873 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.SamePath(System.String)"> | |
|
2874 | <summary> | |
|
2875 | Returns a constraint that tests whether the path provided | |
|
2876 | is the same as an expected path after canonicalization. | |
|
2877 | </summary> | |
|
2878 | </member> | |
|
2879 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.SubPath(System.String)"> | |
|
2880 | <summary> | |
|
2881 | Returns a constraint that tests whether the path provided | |
|
2882 | is the same path or under an expected path after canonicalization. | |
|
2883 | </summary> | |
|
2884 | </member> | |
|
2885 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.SamePathOrUnder(System.String)"> | |
|
2886 | <summary> | |
|
2887 | Returns a constraint that tests whether the path provided | |
|
2888 | is the same path or under an expected path after canonicalization. | |
|
2889 | </summary> | |
|
2890 | </member> | |
|
2891 | <member name="M:NUnit.Framework.Constraints.ConstraintFactory.InRange``1(``0,``0)"> | |
|
2892 | <summary> | |
|
2893 | Returns a constraint that tests whether the actual value falls | |
|
2894 | within a specified range. | |
|
2895 | </summary> | |
|
2896 | </member> | |
|
2897 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Not"> | |
|
2898 | <summary> | |
|
2899 | Returns a ConstraintExpression that negates any | |
|
2900 | following constraint. | |
|
2901 | </summary> | |
|
2902 | </member> | |
|
2903 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.No"> | |
|
2904 | <summary> | |
|
2905 | Returns a ConstraintExpression that negates any | |
|
2906 | following constraint. | |
|
2907 | </summary> | |
|
2908 | </member> | |
|
2909 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.All"> | |
|
2910 | <summary> | |
|
2911 | Returns a ConstraintExpression, which will apply | |
|
2912 | the following constraint to all members of a collection, | |
|
2913 | succeeding if all of them succeed. | |
|
2914 | </summary> | |
|
2915 | </member> | |
|
2916 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Some"> | |
|
2917 | <summary> | |
|
2918 | Returns a ConstraintExpression, which will apply | |
|
2919 | the following constraint to all members of a collection, | |
|
2920 | succeeding if at least one of them succeeds. | |
|
2921 | </summary> | |
|
2922 | </member> | |
|
2923 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.None"> | |
|
2924 | <summary> | |
|
2925 | Returns a ConstraintExpression, which will apply | |
|
2926 | the following constraint to all members of a collection, | |
|
2927 | succeeding if all of them fail. | |
|
2928 | </summary> | |
|
2929 | </member> | |
|
2930 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Length"> | |
|
2931 | <summary> | |
|
2932 | Returns a new ConstraintExpression, which will apply the following | |
|
2933 | constraint to the Length property of the object being tested. | |
|
2934 | </summary> | |
|
2935 | </member> | |
|
2936 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Count"> | |
|
2937 | <summary> | |
|
2938 | Returns a new ConstraintExpression, which will apply the following | |
|
2939 | constraint to the Count property of the object being tested. | |
|
2940 | </summary> | |
|
2941 | </member> | |
|
2942 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Message"> | |
|
2943 | <summary> | |
|
2944 | Returns a new ConstraintExpression, which will apply the following | |
|
2945 | constraint to the Message property of the object being tested. | |
|
2946 | </summary> | |
|
2947 | </member> | |
|
2948 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.InnerException"> | |
|
2949 | <summary> | |
|
2950 | Returns a new ConstraintExpression, which will apply the following | |
|
2951 | constraint to the InnerException property of the object being tested. | |
|
2952 | </summary> | |
|
2953 | </member> | |
|
2954 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Null"> | |
|
2955 | <summary> | |
|
2956 | Returns a constraint that tests for null | |
|
2957 | </summary> | |
|
2958 | </member> | |
|
2959 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.True"> | |
|
2960 | <summary> | |
|
2961 | Returns a constraint that tests for True | |
|
2962 | </summary> | |
|
2963 | </member> | |
|
2964 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.False"> | |
|
2965 | <summary> | |
|
2966 | Returns a constraint that tests for False | |
|
2967 | </summary> | |
|
2968 | </member> | |
|
2969 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Positive"> | |
|
2970 | <summary> | |
|
2971 | Returns a constraint that tests for a positive value | |
|
2972 | </summary> | |
|
2973 | </member> | |
|
2974 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Negative"> | |
|
2975 | <summary> | |
|
2976 | Returns a constraint that tests for a negative value | |
|
2977 | </summary> | |
|
2978 | </member> | |
|
2979 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.NaN"> | |
|
2980 | <summary> | |
|
2981 | Returns a constraint that tests for NaN | |
|
2982 | </summary> | |
|
2983 | </member> | |
|
2984 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Empty"> | |
|
2985 | <summary> | |
|
2986 | Returns a constraint that tests for empty | |
|
2987 | </summary> | |
|
2988 | </member> | |
|
2989 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Unique"> | |
|
2990 | <summary> | |
|
2991 | Returns a constraint that tests whether a collection | |
|
2992 | contains all unique items. | |
|
2993 | </summary> | |
|
2994 | </member> | |
|
2995 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.BinarySerializable"> | |
|
2996 | <summary> | |
|
2997 | Returns a constraint that tests whether an object graph is serializable in binary format. | |
|
2998 | </summary> | |
|
2999 | </member> | |
|
3000 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.XmlSerializable"> | |
|
3001 | <summary> | |
|
3002 | Returns a constraint that tests whether an object graph is serializable in xml format. | |
|
3003 | </summary> | |
|
3004 | </member> | |
|
3005 | <member name="P:NUnit.Framework.Constraints.ConstraintFactory.Ordered"> | |
|
3006 | <summary> | |
|
3007 | Returns a constraint that tests whether a collection is ordered | |
|
3008 | </summary> | |
|
3009 | </member> | |
|
3010 | <member name="M:NUnit.Framework.AssertionHelper.Expect(System.Object,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
3011 | <summary> | |
|
3012 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3013 | is satisfied and throwing an assertion exception on failure. Works | |
|
3014 | identically to Assert.That. | |
|
3015 | </summary> | |
|
3016 | <param name="actual">The actual value to test</param> | |
|
3017 | <param name="expression">A Constraint to be applied</param> | |
|
3018 | </member> | |
|
3019 | <member name="M:NUnit.Framework.AssertionHelper.Expect(System.Object,NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
3020 | <summary> | |
|
3021 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3022 | is satisfied and throwing an assertion exception on failure. Works | |
|
3023 | identically to Assert.That. | |
|
3024 | </summary> | |
|
3025 | <param name="actual">The actual value to test</param> | |
|
3026 | <param name="expression">A Constraint to be applied</param> | |
|
3027 | <param name="message">The message to be displayed in case of failure</param> | |
|
3028 | </member> | |
|
3029 | <member name="M:NUnit.Framework.AssertionHelper.Expect(System.Object,NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
3030 | <summary> | |
|
3031 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3032 | is satisfied and throwing an assertion exception on failure. Works | |
|
3033 | identically to Assert.That. | |
|
3034 | </summary> | |
|
3035 | <param name="actual">The actual value to test</param> | |
|
3036 | <param name="expression">A Constraint to be applied</param> | |
|
3037 | <param name="message">The message to be displayed in case of failure</param> | |
|
3038 | <param name="args">Arguments to use in formatting the message</param> | |
|
3039 | </member> | |
|
3040 | <member name="M:NUnit.Framework.AssertionHelper.Expect(System.Boolean,System.String,System.Object[])"> | |
|
3041 | <summary> | |
|
3042 | Asserts that a condition is true. If the condition is false the method throws | |
|
3043 | an <see cref="T:NUnit.Framework.AssertionException"/>. Works Identically to | |
|
3044 | <see cref="M:NUnit.Framework.Assert.That(System.Boolean,System.String,System.Object[])"/>. | |
|
3045 | </summary> | |
|
3046 | <param name="condition">The evaluated condition</param> | |
|
3047 | <param name="message">The message to display if the condition is false</param> | |
|
3048 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3049 | </member> | |
|
3050 | <member name="M:NUnit.Framework.AssertionHelper.Expect(System.Boolean,System.String)"> | |
|
3051 | <summary> | |
|
3052 | Asserts that a condition is true. If the condition is false the method throws | |
|
3053 | an <see cref="T:NUnit.Framework.AssertionException"/>. Works Identically to | |
|
3054 | <see cref="M:NUnit.Framework.Assert.That(System.Boolean,System.String)"/>. | |
|
3055 | </summary> | |
|
3056 | <param name="condition">The evaluated condition</param> | |
|
3057 | <param name="message">The message to display if the condition is false</param> | |
|
3058 | </member> | |
|
3059 | <member name="M:NUnit.Framework.AssertionHelper.Expect(System.Boolean)"> | |
|
3060 | <summary> | |
|
3061 | Asserts that a condition is true. If the condition is false the method throws | |
|
3062 | an <see cref="T:NUnit.Framework.AssertionException"/>. Works Identically to <see cref="M:NUnit.Framework.Assert.That(System.Boolean)"/>. | |
|
3063 | </summary> | |
|
3064 | <param name="condition">The evaluated condition</param> | |
|
3065 | </member> | |
|
3066 | <member name="M:NUnit.Framework.AssertionHelper.Expect``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
3067 | <summary> | |
|
3068 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3069 | is satisfied and throwing an assertion exception on failure. | |
|
3070 | </summary> | |
|
3071 | <param name="expr">A Constraint expression to be applied</param> | |
|
3072 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
3073 | </member> | |
|
3074 | <member name="M:NUnit.Framework.AssertionHelper.Expect``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
3075 | <summary> | |
|
3076 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3077 | is satisfied and throwing an assertion exception on failure. | |
|
3078 | </summary> | |
|
3079 | <param name="expr">A Constraint expression to be applied</param> | |
|
3080 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
3081 | <param name="message">The message that will be displayed on failure</param> | |
|
3082 | </member> | |
|
3083 | <member name="M:NUnit.Framework.AssertionHelper.Expect``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
3084 | <summary> | |
|
3085 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3086 | is satisfied and throwing an assertion exception on failure. | |
|
3087 | </summary> | |
|
3088 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
3089 | <param name="expr">A Constraint expression to be applied</param> | |
|
3090 | <param name="message">The message that will be displayed on failure</param> | |
|
3091 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3092 | </member> | |
|
3093 | <member name="M:NUnit.Framework.AssertionHelper.Expect``1(``0@,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
3094 | <summary> | |
|
3095 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
3096 | is satisfied and throwing an assertion exception on failure. | |
|
3097 | </summary> | |
|
3098 | <param name="actual">The actual value to test</param> | |
|
3099 | <param name="expression">A Constraint to be applied</param> | |
|
3100 | </member> | |
|
3101 | <member name="M:NUnit.Framework.AssertionHelper.Expect``1(``0@,NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
3102 | <summary> | |
|
3103 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
3104 | is satisfied and throwing an assertion exception on failure. | |
|
3105 | </summary> | |
|
3106 | <param name="actual">The actual value to test</param> | |
|
3107 | <param name="expression">A Constraint to be applied</param> | |
|
3108 | <param name="message">The message that will be displayed on failure</param> | |
|
3109 | </member> | |
|
3110 | <member name="M:NUnit.Framework.AssertionHelper.Expect``1(``0@,NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
3111 | <summary> | |
|
3112 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
3113 | is satisfied and throwing an assertion exception on failure. | |
|
3114 | </summary> | |
|
3115 | <param name="actual">The actual value to test</param> | |
|
3116 | <param name="expression">A Constraint to be applied</param> | |
|
3117 | <param name="message">The message that will be displayed on failure</param> | |
|
3118 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3119 | </member> | |
|
3120 | <member name="M:NUnit.Framework.AssertionHelper.Expect(NUnit.Framework.TestDelegate,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
3121 | <summary> | |
|
3122 | Asserts that the code represented by a delegate throws an exception | |
|
3123 | that satisfies the constraint provided. | |
|
3124 | </summary> | |
|
3125 | <param name="code">A TestDelegate to be executed</param> | |
|
3126 | <param name="constraint">A ThrowsConstraint used in the test</param> | |
|
3127 | </member> | |
|
3128 | <member name="M:NUnit.Framework.AssertionHelper.Map(System.Collections.ICollection)"> | |
|
3129 | <summary> | |
|
3130 | Returns a ListMapper based on a collection. | |
|
3131 | </summary> | |
|
3132 | <param name="original">The original collection</param> | |
|
3133 | <returns></returns> | |
|
3134 | </member> | |
|
3135 | <member name="T:NUnit.Framework.Assume"> | |
|
3136 | <summary> | |
|
3137 | Provides static methods to express the assumptions | |
|
3138 | that must be met for a test to give a meaningful | |
|
3139 | result. If an assumption is not met, the test | |
|
3140 | should produce an inconclusive result. | |
|
3141 | </summary> | |
|
3142 | </member> | |
|
3143 | <member name="M:NUnit.Framework.Assume.Equals(System.Object,System.Object)"> | |
|
3144 | <summary> | |
|
3145 | The Equals method throws an AssertionException. This is done | |
|
3146 | to make sure there is no mistake by calling this function. | |
|
3147 | </summary> | |
|
3148 | <param name="a"></param> | |
|
3149 | <param name="b"></param> | |
|
3150 | </member> | |
|
3151 | <member name="M:NUnit.Framework.Assume.ReferenceEquals(System.Object,System.Object)"> | |
|
3152 | <summary> | |
|
3153 | override the default ReferenceEquals to throw an AssertionException. This | |
|
3154 | implementation makes sure there is no mistake in calling this function | |
|
3155 | as part of Assert. | |
|
3156 | </summary> | |
|
3157 | <param name="a"></param> | |
|
3158 | <param name="b"></param> | |
|
3159 | </member> | |
|
3160 | <member name="M:NUnit.Framework.Assume.That(System.Object,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
3161 | <summary> | |
|
3162 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3163 | is satisfied and throwing an InconclusiveException on failure. | |
|
3164 | </summary> | |
|
3165 | <param name="expression">A Constraint expression to be applied</param> | |
|
3166 | <param name="actual">The actual value to test</param> | |
|
3167 | </member> | |
|
3168 | <member name="M:NUnit.Framework.Assume.That(System.Object,NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
3169 | <summary> | |
|
3170 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3171 | is satisfied and throwing an InconclusiveException on failure. | |
|
3172 | </summary> | |
|
3173 | <param name="expression">A Constraint expression to be applied</param> | |
|
3174 | <param name="actual">The actual value to test</param> | |
|
3175 | <param name="message">The message that will be displayed on failure</param> | |
|
3176 | </member> | |
|
3177 | <member name="M:NUnit.Framework.Assume.That(System.Object,NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
3178 | <summary> | |
|
3179 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3180 | is satisfied and throwing an InconclusiveException on failure. | |
|
3181 | </summary> | |
|
3182 | <param name="expression">A Constraint expression to be applied</param> | |
|
3183 | <param name="actual">The actual value to test</param> | |
|
3184 | <param name="message">The message that will be displayed on failure</param> | |
|
3185 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3186 | </member> | |
|
3187 | <member name="M:NUnit.Framework.Assume.That(System.Boolean,System.String,System.Object[])"> | |
|
3188 | <summary> | |
|
3189 | Asserts that a condition is true. If the condition is false the method throws | |
|
3190 | an <see cref="T:NUnit.Framework.InconclusiveException"/>. | |
|
3191 | </summary> | |
|
3192 | <param name="condition">The evaluated condition</param> | |
|
3193 | <param name="message">The message to display if the condition is false</param> | |
|
3194 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3195 | </member> | |
|
3196 | <member name="M:NUnit.Framework.Assume.That(System.Boolean,System.String)"> | |
|
3197 | <summary> | |
|
3198 | Asserts that a condition is true. If the condition is false the method throws | |
|
3199 | an <see cref="T:NUnit.Framework.InconclusiveException"/>. | |
|
3200 | </summary> | |
|
3201 | <param name="condition">The evaluated condition</param> | |
|
3202 | <param name="message">The message to display if the condition is false</param> | |
|
3203 | </member> | |
|
3204 | <member name="M:NUnit.Framework.Assume.That(System.Boolean)"> | |
|
3205 | <summary> | |
|
3206 | Asserts that a condition is true. If the condition is false the | |
|
3207 | method throws an <see cref="T:NUnit.Framework.InconclusiveException"/>. | |
|
3208 | </summary> | |
|
3209 | <param name="condition">The evaluated condition</param> | |
|
3210 | </member> | |
|
3211 | <member name="M:NUnit.Framework.Assume.That``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
3212 | <summary> | |
|
3213 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3214 | is satisfied and throwing an InconclusiveException on failure. | |
|
3215 | </summary> | |
|
3216 | <param name="expr">A Constraint expression to be applied</param> | |
|
3217 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
3218 | </member> | |
|
3219 | <member name="M:NUnit.Framework.Assume.That``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
3220 | <summary> | |
|
3221 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3222 | is satisfied and throwing an InconclusiveException on failure. | |
|
3223 | </summary> | |
|
3224 | <param name="expr">A Constraint expression to be applied</param> | |
|
3225 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
3226 | <param name="message">The message that will be displayed on failure</param> | |
|
3227 | </member> | |
|
3228 | <member name="M:NUnit.Framework.Assume.That``1(NUnit.Framework.Constraints.ActualValueDelegate{``0},NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
3229 | <summary> | |
|
3230 | Apply a constraint to an actual value, succeeding if the constraint | |
|
3231 | is satisfied and throwing an InconclusiveException on failure. | |
|
3232 | </summary> | |
|
3233 | <param name="del">An ActualValueDelegate returning the value to be tested</param> | |
|
3234 | <param name="expr">A Constraint expression to be applied</param> | |
|
3235 | <param name="message">The message that will be displayed on failure</param> | |
|
3236 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3237 | </member> | |
|
3238 | <member name="M:NUnit.Framework.Assume.That``1(``0@,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
3239 | <summary> | |
|
3240 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
3241 | is satisfied and throwing an InconclusiveException on failure. | |
|
3242 | </summary> | |
|
3243 | <param name="expression">A Constraint expression to be applied</param> | |
|
3244 | <param name="actual">The actual value to test</param> | |
|
3245 | </member> | |
|
3246 | <member name="M:NUnit.Framework.Assume.That``1(``0@,NUnit.Framework.Constraints.IResolveConstraint,System.String)"> | |
|
3247 | <summary> | |
|
3248 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
3249 | is satisfied and throwing an InconclusiveException on failure. | |
|
3250 | </summary> | |
|
3251 | <param name="expression">A Constraint expression to be applied</param> | |
|
3252 | <param name="actual">The actual value to test</param> | |
|
3253 | <param name="message">The message that will be displayed on failure</param> | |
|
3254 | </member> | |
|
3255 | <member name="M:NUnit.Framework.Assume.That``1(``0@,NUnit.Framework.Constraints.IResolveConstraint,System.String,System.Object[])"> | |
|
3256 | <summary> | |
|
3257 | Apply a constraint to a referenced value, succeeding if the constraint | |
|
3258 | is satisfied and throwing an InconclusiveException on failure. | |
|
3259 | </summary> | |
|
3260 | <param name="expression">A Constraint expression to be applied</param> | |
|
3261 | <param name="actual">The actual value to test</param> | |
|
3262 | <param name="message">The message that will be displayed on failure</param> | |
|
3263 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3264 | </member> | |
|
3265 | <member name="M:NUnit.Framework.Assume.That(NUnit.Framework.TestDelegate,NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
3266 | <summary> | |
|
3267 | Asserts that the code represented by a delegate throws an exception | |
|
3268 | that satisfies the constraint provided. | |
|
3269 | </summary> | |
|
3270 | <param name="code">A TestDelegate to be executed</param> | |
|
3271 | <param name="constraint">A ThrowsConstraint used in the test</param> | |
|
3272 | </member> | |
|
3273 | <member name="M:NUnit.Framework.AsyncInvocationRegion.WaitForPendingOperationsToComplete(System.Object)"> | |
|
3274 | <summary> | |
|
3275 | Waits for pending asynchronous operations to complete, if appropriate, | |
|
3276 | and returns a proper result of the invocation by unwrapping task results | |
|
3277 | </summary> | |
|
3278 | <param name="invocationResult">The raw result of the method invocation</param> | |
|
3279 | <returns>The unwrapped result, if necessary</returns> | |
|
3280 | </member> | |
|
3281 | <member name="T:NUnit.Framework.CollectionAssert"> | |
|
3282 | <summary> | |
|
3283 | A set of Assert methods operationg on one or more collections | |
|
3284 | </summary> | |
|
3285 | </member> | |
|
3286 | <member name="M:NUnit.Framework.CollectionAssert.Equals(System.Object,System.Object)"> | |
|
3287 | <summary> | |
|
3288 | The Equals method throws an AssertionException. This is done | |
|
3289 | to make sure there is no mistake by calling this function. | |
|
3290 | </summary> | |
|
3291 | <param name="a"></param> | |
|
3292 | <param name="b"></param> | |
|
3293 | </member> | |
|
3294 | <member name="M:NUnit.Framework.CollectionAssert.ReferenceEquals(System.Object,System.Object)"> | |
|
3295 | <summary> | |
|
3296 | override the default ReferenceEquals to throw an AssertionException. This | |
|
3297 | implementation makes sure there is no mistake in calling this function | |
|
3298 | as part of Assert. | |
|
3299 | </summary> | |
|
3300 | <param name="a"></param> | |
|
3301 | <param name="b"></param> | |
|
3302 | </member> | |
|
3303 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreInstancesOfType(System.Collections.IEnumerable,System.Type)"> | |
|
3304 | <summary> | |
|
3305 | Asserts that all items contained in collection are of the type specified by expectedType. | |
|
3306 | </summary> | |
|
3307 | <param name="collection">IEnumerable containing objects to be considered</param> | |
|
3308 | <param name="expectedType">System.Type that all objects in collection must be instances of</param> | |
|
3309 | </member> | |
|
3310 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreInstancesOfType(System.Collections.IEnumerable,System.Type,System.String)"> | |
|
3311 | <summary> | |
|
3312 | Asserts that all items contained in collection are of the type specified by expectedType. | |
|
3313 | </summary> | |
|
3314 | <param name="collection">IEnumerable containing objects to be considered</param> | |
|
3315 | <param name="expectedType">System.Type that all objects in collection must be instances of</param> | |
|
3316 | <param name="message">The message that will be displayed on failure</param> | |
|
3317 | </member> | |
|
3318 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreInstancesOfType(System.Collections.IEnumerable,System.Type,System.String,System.Object[])"> | |
|
3319 | <summary> | |
|
3320 | Asserts that all items contained in collection are of the type specified by expectedType. | |
|
3321 | </summary> | |
|
3322 | <param name="collection">IEnumerable containing objects to be considered</param> | |
|
3323 | <param name="expectedType">System.Type that all objects in collection must be instances of</param> | |
|
3324 | <param name="message">The message that will be displayed on failure</param> | |
|
3325 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3326 | </member> | |
|
3327 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreNotNull(System.Collections.IEnumerable)"> | |
|
3328 | <summary> | |
|
3329 | Asserts that all items contained in collection are not equal to null. | |
|
3330 | </summary> | |
|
3331 | <param name="collection">IEnumerable containing objects to be considered</param> | |
|
3332 | </member> | |
|
3333 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreNotNull(System.Collections.IEnumerable,System.String)"> | |
|
3334 | <summary> | |
|
3335 | Asserts that all items contained in collection are not equal to null. | |
|
3336 | </summary> | |
|
3337 | <param name="collection">IEnumerable containing objects to be considered</param> | |
|
3338 | <param name="message">The message that will be displayed on failure</param> | |
|
3339 | </member> | |
|
3340 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreNotNull(System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3341 | <summary> | |
|
3342 | Asserts that all items contained in collection are not equal to null. | |
|
3343 | </summary> | |
|
3344 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3345 | <param name="message">The message that will be displayed on failure</param> | |
|
3346 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3347 | </member> | |
|
3348 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreUnique(System.Collections.IEnumerable)"> | |
|
3349 | <summary> | |
|
3350 | Ensures that every object contained in collection exists within the collection | |
|
3351 | once and only once. | |
|
3352 | </summary> | |
|
3353 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3354 | </member> | |
|
3355 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreUnique(System.Collections.IEnumerable,System.String)"> | |
|
3356 | <summary> | |
|
3357 | Ensures that every object contained in collection exists within the collection | |
|
3358 | once and only once. | |
|
3359 | </summary> | |
|
3360 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3361 | <param name="message">The message that will be displayed on failure</param> | |
|
3362 | </member> | |
|
3363 | <member name="M:NUnit.Framework.CollectionAssert.AllItemsAreUnique(System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3364 | <summary> | |
|
3365 | Ensures that every object contained in collection exists within the collection | |
|
3366 | once and only once. | |
|
3367 | </summary> | |
|
3368 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3369 | <param name="message">The message that will be displayed on failure</param> | |
|
3370 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3371 | </member> | |
|
3372 | <member name="M:NUnit.Framework.CollectionAssert.AreEqual(System.Collections.IEnumerable,System.Collections.IEnumerable)"> | |
|
3373 | <summary> | |
|
3374 | Asserts that expected and actual are exactly equal. The collections must have the same count, | |
|
3375 | and contain the exact same objects in the same order. | |
|
3376 | </summary> | |
|
3377 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3378 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3379 | </member> | |
|
3380 | <member name="M:NUnit.Framework.CollectionAssert.AreEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.Collections.IComparer)"> | |
|
3381 | <summary> | |
|
3382 | Asserts that expected and actual are exactly equal. The collections must have the same count, | |
|
3383 | and contain the exact same objects in the same order. | |
|
3384 | If comparer is not null then it will be used to compare the objects. | |
|
3385 | </summary> | |
|
3386 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3387 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3388 | <param name="comparer">The IComparer to use in comparing objects from each IEnumerable</param> | |
|
3389 | </member> | |
|
3390 | <member name="M:NUnit.Framework.CollectionAssert.AreEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String)"> | |
|
3391 | <summary> | |
|
3392 | Asserts that expected and actual are exactly equal. The collections must have the same count, | |
|
3393 | and contain the exact same objects in the same order. | |
|
3394 | </summary> | |
|
3395 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3396 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3397 | <param name="message">The message that will be displayed on failure</param> | |
|
3398 | </member> | |
|
3399 | <member name="M:NUnit.Framework.CollectionAssert.AreEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.Collections.IComparer,System.String)"> | |
|
3400 | <summary> | |
|
3401 | Asserts that expected and actual are exactly equal. The collections must have the same count, | |
|
3402 | and contain the exact same objects in the same order. | |
|
3403 | If comparer is not null then it will be used to compare the objects. | |
|
3404 | </summary> | |
|
3405 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3406 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3407 | <param name="comparer">The IComparer to use in comparing objects from each IEnumerable</param> | |
|
3408 | <param name="message">The message that will be displayed on failure</param> | |
|
3409 | </member> | |
|
3410 | <member name="M:NUnit.Framework.CollectionAssert.AreEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3411 | <summary> | |
|
3412 | Asserts that expected and actual are exactly equal. The collections must have the same count, | |
|
3413 | and contain the exact same objects in the same order. | |
|
3414 | </summary> | |
|
3415 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3416 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3417 | <param name="message">The message that will be displayed on failure</param> | |
|
3418 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3419 | </member> | |
|
3420 | <member name="M:NUnit.Framework.CollectionAssert.AreEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.Collections.IComparer,System.String,System.Object[])"> | |
|
3421 | <summary> | |
|
3422 | Asserts that expected and actual are exactly equal. The collections must have the same count, | |
|
3423 | and contain the exact same objects in the same order. | |
|
3424 | If comparer is not null then it will be used to compare the objects. | |
|
3425 | </summary> | |
|
3426 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3427 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3428 | <param name="comparer">The IComparer to use in comparing objects from each IEnumerable</param> | |
|
3429 | <param name="message">The message that will be displayed on failure</param> | |
|
3430 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3431 | </member> | |
|
3432 | <member name="M:NUnit.Framework.CollectionAssert.AreEquivalent(System.Collections.IEnumerable,System.Collections.IEnumerable)"> | |
|
3433 | <summary> | |
|
3434 | Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. | |
|
3435 | </summary> | |
|
3436 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3437 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3438 | </member> | |
|
3439 | <member name="M:NUnit.Framework.CollectionAssert.AreEquivalent(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String)"> | |
|
3440 | <summary> | |
|
3441 | Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. | |
|
3442 | </summary> | |
|
3443 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3444 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3445 | <param name="message">The message that will be displayed on failure</param> | |
|
3446 | </member> | |
|
3447 | <member name="M:NUnit.Framework.CollectionAssert.AreEquivalent(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3448 | <summary> | |
|
3449 | Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. | |
|
3450 | </summary> | |
|
3451 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3452 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3453 | <param name="message">The message that will be displayed on failure</param> | |
|
3454 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3455 | </member> | |
|
3456 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEqual(System.Collections.IEnumerable,System.Collections.IEnumerable)"> | |
|
3457 | <summary> | |
|
3458 | Asserts that expected and actual are not exactly equal. | |
|
3459 | </summary> | |
|
3460 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3461 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3462 | </member> | |
|
3463 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.Collections.IComparer)"> | |
|
3464 | <summary> | |
|
3465 | Asserts that expected and actual are not exactly equal. | |
|
3466 | If comparer is not null then it will be used to compare the objects. | |
|
3467 | </summary> | |
|
3468 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3469 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3470 | <param name="comparer">The IComparer to use in comparing objects from each IEnumerable</param> | |
|
3471 | </member> | |
|
3472 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String)"> | |
|
3473 | <summary> | |
|
3474 | Asserts that expected and actual are not exactly equal. | |
|
3475 | </summary> | |
|
3476 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3477 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3478 | <param name="message">The message that will be displayed on failure</param> | |
|
3479 | </member> | |
|
3480 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.Collections.IComparer,System.String)"> | |
|
3481 | <summary> | |
|
3482 | Asserts that expected and actual are not exactly equal. | |
|
3483 | If comparer is not null then it will be used to compare the objects. | |
|
3484 | </summary> | |
|
3485 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3486 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3487 | <param name="comparer">The IComparer to use in comparing objects from each IEnumerable</param> | |
|
3488 | <param name="message">The message that will be displayed on failure</param> | |
|
3489 | </member> | |
|
3490 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3491 | <summary> | |
|
3492 | Asserts that expected and actual are not exactly equal. | |
|
3493 | </summary> | |
|
3494 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3495 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3496 | <param name="message">The message that will be displayed on failure</param> | |
|
3497 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3498 | </member> | |
|
3499 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEqual(System.Collections.IEnumerable,System.Collections.IEnumerable,System.Collections.IComparer,System.String,System.Object[])"> | |
|
3500 | <summary> | |
|
3501 | Asserts that expected and actual are not exactly equal. | |
|
3502 | If comparer is not null then it will be used to compare the objects. | |
|
3503 | </summary> | |
|
3504 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3505 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3506 | <param name="comparer">The IComparer to use in comparing objects from each IEnumerable</param> | |
|
3507 | <param name="message">The message that will be displayed on failure</param> | |
|
3508 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3509 | </member> | |
|
3510 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEquivalent(System.Collections.IEnumerable,System.Collections.IEnumerable)"> | |
|
3511 | <summary> | |
|
3512 | Asserts that expected and actual are not equivalent. | |
|
3513 | </summary> | |
|
3514 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3515 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3516 | </member> | |
|
3517 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEquivalent(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String)"> | |
|
3518 | <summary> | |
|
3519 | Asserts that expected and actual are not equivalent. | |
|
3520 | </summary> | |
|
3521 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3522 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3523 | <param name="message">The message that will be displayed on failure</param> | |
|
3524 | </member> | |
|
3525 | <member name="M:NUnit.Framework.CollectionAssert.AreNotEquivalent(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3526 | <summary> | |
|
3527 | Asserts that expected and actual are not equivalent. | |
|
3528 | </summary> | |
|
3529 | <param name="expected">The first IEnumerable of objects to be considered</param> | |
|
3530 | <param name="actual">The second IEnumerable of objects to be considered</param> | |
|
3531 | <param name="message">The message that will be displayed on failure</param> | |
|
3532 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3533 | </member> | |
|
3534 | <member name="M:NUnit.Framework.CollectionAssert.Contains(System.Collections.IEnumerable,System.Object)"> | |
|
3535 | <summary> | |
|
3536 | Asserts that collection contains actual as an item. | |
|
3537 | </summary> | |
|
3538 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3539 | <param name="actual">Object to be found within collection</param> | |
|
3540 | </member> | |
|
3541 | <member name="M:NUnit.Framework.CollectionAssert.Contains(System.Collections.IEnumerable,System.Object,System.String)"> | |
|
3542 | <summary> | |
|
3543 | Asserts that collection contains actual as an item. | |
|
3544 | </summary> | |
|
3545 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3546 | <param name="actual">Object to be found within collection</param> | |
|
3547 | <param name="message">The message that will be displayed on failure</param> | |
|
3548 | </member> | |
|
3549 | <member name="M:NUnit.Framework.CollectionAssert.Contains(System.Collections.IEnumerable,System.Object,System.String,System.Object[])"> | |
|
3550 | <summary> | |
|
3551 | Asserts that collection contains actual as an item. | |
|
3552 | </summary> | |
|
3553 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3554 | <param name="actual">Object to be found within collection</param> | |
|
3555 | <param name="message">The message that will be displayed on failure</param> | |
|
3556 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3557 | </member> | |
|
3558 | <member name="M:NUnit.Framework.CollectionAssert.DoesNotContain(System.Collections.IEnumerable,System.Object)"> | |
|
3559 | <summary> | |
|
3560 | Asserts that collection does not contain actual as an item. | |
|
3561 | </summary> | |
|
3562 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3563 | <param name="actual">Object that cannot exist within collection</param> | |
|
3564 | </member> | |
|
3565 | <member name="M:NUnit.Framework.CollectionAssert.DoesNotContain(System.Collections.IEnumerable,System.Object,System.String)"> | |
|
3566 | <summary> | |
|
3567 | Asserts that collection does not contain actual as an item. | |
|
3568 | </summary> | |
|
3569 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3570 | <param name="actual">Object that cannot exist within collection</param> | |
|
3571 | <param name="message">The message that will be displayed on failure</param> | |
|
3572 | </member> | |
|
3573 | <member name="M:NUnit.Framework.CollectionAssert.DoesNotContain(System.Collections.IEnumerable,System.Object,System.String,System.Object[])"> | |
|
3574 | <summary> | |
|
3575 | Asserts that collection does not contain actual as an item. | |
|
3576 | </summary> | |
|
3577 | <param name="collection">IEnumerable of objects to be considered</param> | |
|
3578 | <param name="actual">Object that cannot exist within collection</param> | |
|
3579 | <param name="message">The message that will be displayed on failure</param> | |
|
3580 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3581 | </member> | |
|
3582 | <member name="M:NUnit.Framework.CollectionAssert.IsNotSubsetOf(System.Collections.IEnumerable,System.Collections.IEnumerable)"> | |
|
3583 | <summary> | |
|
3584 | Asserts that the superset does not contain the subset | |
|
3585 | </summary> | |
|
3586 | <param name="subset">The IEnumerable subset to be considered</param> | |
|
3587 | <param name="superset">The IEnumerable superset to be considered</param> | |
|
3588 | </member> | |
|
3589 | <member name="M:NUnit.Framework.CollectionAssert.IsNotSubsetOf(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String)"> | |
|
3590 | <summary> | |
|
3591 | Asserts that the superset does not contain the subset | |
|
3592 | </summary> | |
|
3593 | <param name="subset">The IEnumerable subset to be considered</param> | |
|
3594 | <param name="superset">The IEnumerable superset to be considered</param> | |
|
3595 | <param name="message">The message that will be displayed on failure</param> | |
|
3596 | </member> | |
|
3597 | <member name="M:NUnit.Framework.CollectionAssert.IsNotSubsetOf(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3598 | <summary> | |
|
3599 | Asserts that the superset does not contain the subset | |
|
3600 | </summary> | |
|
3601 | <param name="subset">The IEnumerable subset to be considered</param> | |
|
3602 | <param name="superset">The IEnumerable superset to be considered</param> | |
|
3603 | <param name="message">The message that will be displayed on failure</param> | |
|
3604 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3605 | </member> | |
|
3606 | <member name="M:NUnit.Framework.CollectionAssert.IsSubsetOf(System.Collections.IEnumerable,System.Collections.IEnumerable)"> | |
|
3607 | <summary> | |
|
3608 | Asserts that the superset contains the subset. | |
|
3609 | </summary> | |
|
3610 | <param name="subset">The IEnumerable subset to be considered</param> | |
|
3611 | <param name="superset">The IEnumerable superset to be considered</param> | |
|
3612 | </member> | |
|
3613 | <member name="M:NUnit.Framework.CollectionAssert.IsSubsetOf(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String)"> | |
|
3614 | <summary> | |
|
3615 | Asserts that the superset contains the subset. | |
|
3616 | </summary> | |
|
3617 | <param name="subset">The IEnumerable subset to be considered</param> | |
|
3618 | <param name="superset">The IEnumerable superset to be considered</param> | |
|
3619 | <param name="message">The message that will be displayed on failure</param> | |
|
3620 | </member> | |
|
3621 | <member name="M:NUnit.Framework.CollectionAssert.IsSubsetOf(System.Collections.IEnumerable,System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3622 | <summary> | |
|
3623 | Asserts that the superset contains the subset. | |
|
3624 | </summary> | |
|
3625 | <param name="subset">The IEnumerable subset to be considered</param> | |
|
3626 | <param name="superset">The IEnumerable superset to be considered</param> | |
|
3627 | <param name="message">The message that will be displayed on failure</param> | |
|
3628 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3629 | </member> | |
|
3630 | <member name="M:NUnit.Framework.CollectionAssert.IsEmpty(System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3631 | <summary> | |
|
3632 | Assert that an array, list or other collection is empty | |
|
3633 | </summary> | |
|
3634 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3635 | <param name="message">The message to be displayed on failure</param> | |
|
3636 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3637 | </member> | |
|
3638 | <member name="M:NUnit.Framework.CollectionAssert.IsEmpty(System.Collections.IEnumerable,System.String)"> | |
|
3639 | <summary> | |
|
3640 | Assert that an array, list or other collection is empty | |
|
3641 | </summary> | |
|
3642 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3643 | <param name="message">The message to be displayed on failure</param> | |
|
3644 | </member> | |
|
3645 | <member name="M:NUnit.Framework.CollectionAssert.IsEmpty(System.Collections.IEnumerable)"> | |
|
3646 | <summary> | |
|
3647 | Assert that an array,list or other collection is empty | |
|
3648 | </summary> | |
|
3649 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3650 | </member> | |
|
3651 | <member name="M:NUnit.Framework.CollectionAssert.IsNotEmpty(System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3652 | <summary> | |
|
3653 | Assert that an array, list or other collection is empty | |
|
3654 | </summary> | |
|
3655 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3656 | <param name="message">The message to be displayed on failure</param> | |
|
3657 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3658 | </member> | |
|
3659 | <member name="M:NUnit.Framework.CollectionAssert.IsNotEmpty(System.Collections.IEnumerable,System.String)"> | |
|
3660 | <summary> | |
|
3661 | Assert that an array, list or other collection is empty | |
|
3662 | </summary> | |
|
3663 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3664 | <param name="message">The message to be displayed on failure</param> | |
|
3665 | </member> | |
|
3666 | <member name="M:NUnit.Framework.CollectionAssert.IsNotEmpty(System.Collections.IEnumerable)"> | |
|
3667 | <summary> | |
|
3668 | Assert that an array,list or other collection is empty | |
|
3669 | </summary> | |
|
3670 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3671 | </member> | |
|
3672 | <member name="M:NUnit.Framework.CollectionAssert.IsOrdered(System.Collections.IEnumerable,System.String,System.Object[])"> | |
|
3673 | <summary> | |
|
3674 | Assert that an array, list or other collection is ordered | |
|
3675 | </summary> | |
|
3676 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3677 | <param name="message">The message to be displayed on failure</param> | |
|
3678 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3679 | </member> | |
|
3680 | <member name="M:NUnit.Framework.CollectionAssert.IsOrdered(System.Collections.IEnumerable,System.String)"> | |
|
3681 | <summary> | |
|
3682 | Assert that an array, list or other collection is ordered | |
|
3683 | </summary> | |
|
3684 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3685 | <param name="message">The message to be displayed on failure</param> | |
|
3686 | </member> | |
|
3687 | <member name="M:NUnit.Framework.CollectionAssert.IsOrdered(System.Collections.IEnumerable)"> | |
|
3688 | <summary> | |
|
3689 | Assert that an array, list or other collection is ordered | |
|
3690 | </summary> | |
|
3691 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3692 | </member> | |
|
3693 | <member name="M:NUnit.Framework.CollectionAssert.IsOrdered(System.Collections.IEnumerable,System.Collections.IComparer,System.String,System.Object[])"> | |
|
3694 | <summary> | |
|
3695 | Assert that an array, list or other collection is ordered | |
|
3696 | </summary> | |
|
3697 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3698 | <param name="comparer">A custom comparer to perform the comparisons</param> | |
|
3699 | <param name="message">The message to be displayed on failure</param> | |
|
3700 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3701 | </member> | |
|
3702 | <member name="M:NUnit.Framework.CollectionAssert.IsOrdered(System.Collections.IEnumerable,System.Collections.IComparer,System.String)"> | |
|
3703 | <summary> | |
|
3704 | Assert that an array, list or other collection is ordered | |
|
3705 | </summary> | |
|
3706 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3707 | <param name="comparer">A custom comparer to perform the comparisons</param> | |
|
3708 | <param name="message">The message to be displayed on failure</param> | |
|
3709 | </member> | |
|
3710 | <member name="M:NUnit.Framework.CollectionAssert.IsOrdered(System.Collections.IEnumerable,System.Collections.IComparer)"> | |
|
3711 | <summary> | |
|
3712 | Assert that an array, list or other collection is ordered | |
|
3713 | </summary> | |
|
3714 | <param name="collection">An array, list or other collection implementing IEnumerable</param> | |
|
3715 | <param name="comparer">A custom comparer to perform the comparisons</param> | |
|
3716 | </member> | |
|
3717 | <member name="T:NUnit.Framework.Contains"> | |
|
3718 | <summary> | |
|
3719 | Helper class with properties and methods that supply | |
|
3720 | a number of constraints used in Asserts. | |
|
3721 | </summary> | |
|
3722 | </member> | |
|
3723 | <member name="M:NUnit.Framework.Contains.Item(System.Object)"> | |
|
3724 | <summary> | |
|
3725 | Returns a new CollectionContainsConstraint checking for the | |
|
3726 | presence of a particular object in the collection. | |
|
3727 | </summary> | |
|
3728 | </member> | |
|
3729 | <member name="M:NUnit.Framework.Contains.Substring(System.String)"> | |
|
3730 | <summary> | |
|
3731 | Returns a constraint that succeeds if the actual | |
|
3732 | value contains the substring supplied as an argument. | |
|
3733 | </summary> | |
|
3734 | </member> | |
|
3735 | <member name="T:NUnit.Framework.DirectoryAssert"> | |
|
3736 | <summary> | |
|
3737 | Summary description for DirectoryAssert | |
|
3738 | </summary> | |
|
3739 | </member> | |
|
3740 | <member name="M:NUnit.Framework.DirectoryAssert.Equals(System.Object,System.Object)"> | |
|
3741 | <summary> | |
|
3742 | The Equals method throws an AssertionException. This is done | |
|
3743 | to make sure there is no mistake by calling this function. | |
|
3744 | </summary> | |
|
3745 | <param name="a"></param> | |
|
3746 | <param name="b"></param> | |
|
3747 | </member> | |
|
3748 | <member name="M:NUnit.Framework.DirectoryAssert.ReferenceEquals(System.Object,System.Object)"> | |
|
3749 | <summary> | |
|
3750 | override the default ReferenceEquals to throw an AssertionException. This | |
|
3751 | implementation makes sure there is no mistake in calling this function | |
|
3752 | as part of Assert. | |
|
3753 | </summary> | |
|
3754 | <param name="a"></param> | |
|
3755 | <param name="b"></param> | |
|
3756 | </member> | |
|
3757 | <member name="M:NUnit.Framework.DirectoryAssert.#ctor"> | |
|
3758 | <summary> | |
|
3759 | We don't actually want any instances of this object, but some people | |
|
3760 | like to inherit from it to add other static methods. Hence, the | |
|
3761 | protected constructor disallows any instances of this object. | |
|
3762 | </summary> | |
|
3763 | </member> | |
|
3764 | <member name="M:NUnit.Framework.DirectoryAssert.AreEqual(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String,System.Object[])"> | |
|
3765 | <summary> | |
|
3766 | Verifies that two directories are equal. Two directories are considered | |
|
3767 | equal if both are null, or if both have the same value byte for byte. | |
|
3768 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3769 | </summary> | |
|
3770 | <param name="expected">A directory containing the value that is expected</param> | |
|
3771 | <param name="actual">A directory containing the actual value</param> | |
|
3772 | <param name="message">The message to display if directories are not equal</param> | |
|
3773 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3774 | </member> | |
|
3775 | <member name="M:NUnit.Framework.DirectoryAssert.AreEqual(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String)"> | |
|
3776 | <summary> | |
|
3777 | Verifies that two directories are equal. Two directories are considered | |
|
3778 | equal if both are null, or if both have the same value byte for byte. | |
|
3779 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3780 | </summary> | |
|
3781 | <param name="expected">A directory containing the value that is expected</param> | |
|
3782 | <param name="actual">A directory containing the actual value</param> | |
|
3783 | <param name="message">The message to display if directories are not equal</param> | |
|
3784 | </member> | |
|
3785 | <member name="M:NUnit.Framework.DirectoryAssert.AreEqual(System.IO.DirectoryInfo,System.IO.DirectoryInfo)"> | |
|
3786 | <summary> | |
|
3787 | Verifies that two directories are equal. Two directories are considered | |
|
3788 | equal if both are null, or if both have the same value byte for byte. | |
|
3789 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3790 | </summary> | |
|
3791 | <param name="expected">A directory containing the value that is expected</param> | |
|
3792 | <param name="actual">A directory containing the actual value</param> | |
|
3793 | </member> | |
|
3794 | <member name="M:NUnit.Framework.DirectoryAssert.AreEqual(System.String,System.String,System.String,System.Object[])"> | |
|
3795 | <summary> | |
|
3796 | Verifies that two directories are equal. Two directories are considered | |
|
3797 | equal if both are null, or if both have the same value byte for byte. | |
|
3798 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3799 | </summary> | |
|
3800 | <param name="expected">A directory path string containing the value that is expected</param> | |
|
3801 | <param name="actual">A directory path string containing the actual value</param> | |
|
3802 | <param name="message">The message to display if directories are not equal</param> | |
|
3803 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3804 | </member> | |
|
3805 | <member name="M:NUnit.Framework.DirectoryAssert.AreEqual(System.String,System.String,System.String)"> | |
|
3806 | <summary> | |
|
3807 | Verifies that two directories are equal. Two directories are considered | |
|
3808 | equal if both are null, or if both have the same value byte for byte. | |
|
3809 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3810 | </summary> | |
|
3811 | <param name="expected">A directory path string containing the value that is expected</param> | |
|
3812 | <param name="actual">A directory path string containing the actual value</param> | |
|
3813 | <param name="message">The message to display if directories are not equal</param> | |
|
3814 | </member> | |
|
3815 | <member name="M:NUnit.Framework.DirectoryAssert.AreEqual(System.String,System.String)"> | |
|
3816 | <summary> | |
|
3817 | Verifies that two directories are equal. Two directories are considered | |
|
3818 | equal if both are null, or if both have the same value byte for byte. | |
|
3819 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3820 | </summary> | |
|
3821 | <param name="expected">A directory path string containing the value that is expected</param> | |
|
3822 | <param name="actual">A directory path string containing the actual value</param> | |
|
3823 | </member> | |
|
3824 | <member name="M:NUnit.Framework.DirectoryAssert.AreNotEqual(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String,System.Object[])"> | |
|
3825 | <summary> | |
|
3826 | Asserts that two directories are not equal. If they are equal | |
|
3827 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3828 | </summary> | |
|
3829 | <param name="expected">A directory containing the value that is expected</param> | |
|
3830 | <param name="actual">A directory containing the actual value</param> | |
|
3831 | <param name="message">The message to display if directories are not equal</param> | |
|
3832 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3833 | </member> | |
|
3834 | <member name="M:NUnit.Framework.DirectoryAssert.AreNotEqual(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String)"> | |
|
3835 | <summary> | |
|
3836 | Asserts that two directories are not equal. If they are equal | |
|
3837 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3838 | </summary> | |
|
3839 | <param name="expected">A directory containing the value that is expected</param> | |
|
3840 | <param name="actual">A directory containing the actual value</param> | |
|
3841 | <param name="message">The message to display if directories are not equal</param> | |
|
3842 | </member> | |
|
3843 | <member name="M:NUnit.Framework.DirectoryAssert.AreNotEqual(System.IO.DirectoryInfo,System.IO.DirectoryInfo)"> | |
|
3844 | <summary> | |
|
3845 | Asserts that two directories are not equal. If they are equal | |
|
3846 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3847 | </summary> | |
|
3848 | <param name="expected">A directory containing the value that is expected</param> | |
|
3849 | <param name="actual">A directory containing the actual value</param> | |
|
3850 | </member> | |
|
3851 | <member name="M:NUnit.Framework.DirectoryAssert.AreNotEqual(System.String,System.String,System.String,System.Object[])"> | |
|
3852 | <summary> | |
|
3853 | Asserts that two directories are not equal. If they are equal | |
|
3854 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3855 | </summary> | |
|
3856 | <param name="expected">A directory path string containing the value that is expected</param> | |
|
3857 | <param name="actual">A directory path string containing the actual value</param> | |
|
3858 | <param name="message">The message to display if directories are equal</param> | |
|
3859 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3860 | </member> | |
|
3861 | <member name="M:NUnit.Framework.DirectoryAssert.AreNotEqual(System.String,System.String,System.String)"> | |
|
3862 | <summary> | |
|
3863 | Asserts that two directories are not equal. If they are equal | |
|
3864 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3865 | </summary> | |
|
3866 | <param name="expected">A directory path string containing the value that is expected</param> | |
|
3867 | <param name="actual">A directory path string containing the actual value</param> | |
|
3868 | <param name="message">The message to display if directories are equal</param> | |
|
3869 | </member> | |
|
3870 | <member name="M:NUnit.Framework.DirectoryAssert.AreNotEqual(System.String,System.String)"> | |
|
3871 | <summary> | |
|
3872 | Asserts that two directories are not equal. If they are equal | |
|
3873 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3874 | </summary> | |
|
3875 | <param name="expected">A directory path string containing the value that is expected</param> | |
|
3876 | <param name="actual">A directory path string containing the actual value</param> | |
|
3877 | </member> | |
|
3878 | <member name="M:NUnit.Framework.DirectoryAssert.IsEmpty(System.IO.DirectoryInfo,System.String,System.Object[])"> | |
|
3879 | <summary> | |
|
3880 | Asserts that the directory is empty. If it is not empty | |
|
3881 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3882 | </summary> | |
|
3883 | <param name="directory">A directory to search</param> | |
|
3884 | <param name="message">The message to display if directories are not equal</param> | |
|
3885 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3886 | </member> | |
|
3887 | <member name="M:NUnit.Framework.DirectoryAssert.IsEmpty(System.IO.DirectoryInfo,System.String)"> | |
|
3888 | <summary> | |
|
3889 | Asserts that the directory is empty. If it is not empty | |
|
3890 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3891 | </summary> | |
|
3892 | <param name="directory">A directory to search</param> | |
|
3893 | <param name="message">The message to display if directories are not equal</param> | |
|
3894 | </member> | |
|
3895 | <member name="M:NUnit.Framework.DirectoryAssert.IsEmpty(System.IO.DirectoryInfo)"> | |
|
3896 | <summary> | |
|
3897 | Asserts that the directory is empty. If it is not empty | |
|
3898 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3899 | </summary> | |
|
3900 | <param name="directory">A directory to search</param> | |
|
3901 | </member> | |
|
3902 | <member name="M:NUnit.Framework.DirectoryAssert.IsEmpty(System.String,System.String,System.Object[])"> | |
|
3903 | <summary> | |
|
3904 | Asserts that the directory is empty. If it is not empty | |
|
3905 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3906 | </summary> | |
|
3907 | <param name="directory">A directory to search</param> | |
|
3908 | <param name="message">The message to display if directories are not equal</param> | |
|
3909 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3910 | </member> | |
|
3911 | <member name="M:NUnit.Framework.DirectoryAssert.IsEmpty(System.String,System.String)"> | |
|
3912 | <summary> | |
|
3913 | Asserts that the directory is empty. If it is not empty | |
|
3914 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3915 | </summary> | |
|
3916 | <param name="directory">A directory to search</param> | |
|
3917 | <param name="message">The message to display if directories are not equal</param> | |
|
3918 | </member> | |
|
3919 | <member name="M:NUnit.Framework.DirectoryAssert.IsEmpty(System.String)"> | |
|
3920 | <summary> | |
|
3921 | Asserts that the directory is empty. If it is not empty | |
|
3922 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3923 | </summary> | |
|
3924 | <param name="directory">A directory to search</param> | |
|
3925 | </member> | |
|
3926 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotEmpty(System.IO.DirectoryInfo,System.String,System.Object[])"> | |
|
3927 | <summary> | |
|
3928 | Asserts that the directory is not empty. If it is empty | |
|
3929 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3930 | </summary> | |
|
3931 | <param name="directory">A directory to search</param> | |
|
3932 | <param name="message">The message to display if directories are not equal</param> | |
|
3933 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3934 | </member> | |
|
3935 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotEmpty(System.IO.DirectoryInfo,System.String)"> | |
|
3936 | <summary> | |
|
3937 | Asserts that the directory is not empty. If it is empty | |
|
3938 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3939 | </summary> | |
|
3940 | <param name="directory">A directory to search</param> | |
|
3941 | <param name="message">The message to display if directories are not equal</param> | |
|
3942 | </member> | |
|
3943 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotEmpty(System.IO.DirectoryInfo)"> | |
|
3944 | <summary> | |
|
3945 | Asserts that the directory is not empty. If it is empty | |
|
3946 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3947 | </summary> | |
|
3948 | <param name="directory">A directory to search</param> | |
|
3949 | </member> | |
|
3950 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotEmpty(System.String,System.String,System.Object[])"> | |
|
3951 | <summary> | |
|
3952 | Asserts that the directory is not empty. If it is empty | |
|
3953 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3954 | </summary> | |
|
3955 | <param name="directory">A directory to search</param> | |
|
3956 | <param name="message">The message to display if directories are not equal</param> | |
|
3957 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3958 | </member> | |
|
3959 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotEmpty(System.String,System.String)"> | |
|
3960 | <summary> | |
|
3961 | Asserts that the directory is not empty. If it is empty | |
|
3962 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3963 | </summary> | |
|
3964 | <param name="directory">A directory to search</param> | |
|
3965 | <param name="message">The message to display if directories are not equal</param> | |
|
3966 | </member> | |
|
3967 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotEmpty(System.String)"> | |
|
3968 | <summary> | |
|
3969 | Asserts that the directory is not empty. If it is empty | |
|
3970 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3971 | </summary> | |
|
3972 | <param name="directory">A directory to search</param> | |
|
3973 | </member> | |
|
3974 | <member name="M:NUnit.Framework.DirectoryAssert.IsWithin(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String,System.Object[])"> | |
|
3975 | <summary> | |
|
3976 | Asserts that path contains actual as a subdirectory or | |
|
3977 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3978 | </summary> | |
|
3979 | <param name="directory">A directory to search</param> | |
|
3980 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
3981 | <param name="message">The message to display if directory is not within the path</param> | |
|
3982 | <param name="args">Arguments to be used in formatting the message</param> | |
|
3983 | </member> | |
|
3984 | <member name="M:NUnit.Framework.DirectoryAssert.IsWithin(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String)"> | |
|
3985 | <summary> | |
|
3986 | Asserts that path contains actual as a subdirectory or | |
|
3987 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3988 | </summary> | |
|
3989 | <param name="directory">A directory to search</param> | |
|
3990 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
3991 | <param name="message">The message to display if directory is not within the path</param> | |
|
3992 | </member> | |
|
3993 | <member name="M:NUnit.Framework.DirectoryAssert.IsWithin(System.IO.DirectoryInfo,System.IO.DirectoryInfo)"> | |
|
3994 | <summary> | |
|
3995 | Asserts that path contains actual as a subdirectory or | |
|
3996 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
3997 | </summary> | |
|
3998 | <param name="directory">A directory to search</param> | |
|
3999 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4000 | </member> | |
|
4001 | <member name="M:NUnit.Framework.DirectoryAssert.IsWithin(System.String,System.String,System.String,System.Object[])"> | |
|
4002 | <summary> | |
|
4003 | Asserts that path contains actual as a subdirectory or | |
|
4004 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4005 | </summary> | |
|
4006 | <param name="directory">A directory to search</param> | |
|
4007 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4008 | <param name="message">The message to display if directory is not within the path</param> | |
|
4009 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4010 | </member> | |
|
4011 | <member name="M:NUnit.Framework.DirectoryAssert.IsWithin(System.String,System.String,System.String)"> | |
|
4012 | <summary> | |
|
4013 | Asserts that path contains actual as a subdirectory or | |
|
4014 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4015 | </summary> | |
|
4016 | <param name="directory">A directory to search</param> | |
|
4017 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4018 | <param name="message">The message to display if directory is not within the path</param> | |
|
4019 | </member> | |
|
4020 | <member name="M:NUnit.Framework.DirectoryAssert.IsWithin(System.String,System.String)"> | |
|
4021 | <summary> | |
|
4022 | Asserts that path contains actual as a subdirectory or | |
|
4023 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4024 | </summary> | |
|
4025 | <param name="directory">A directory to search</param> | |
|
4026 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4027 | </member> | |
|
4028 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotWithin(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String,System.Object[])"> | |
|
4029 | <summary> | |
|
4030 | Asserts that path does not contain actual as a subdirectory or | |
|
4031 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4032 | </summary> | |
|
4033 | <param name="directory">A directory to search</param> | |
|
4034 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4035 | <param name="message">The message to display if directory is not within the path</param> | |
|
4036 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4037 | </member> | |
|
4038 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotWithin(System.IO.DirectoryInfo,System.IO.DirectoryInfo,System.String)"> | |
|
4039 | <summary> | |
|
4040 | Asserts that path does not contain actual as a subdirectory or | |
|
4041 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4042 | </summary> | |
|
4043 | <param name="directory">A directory to search</param> | |
|
4044 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4045 | <param name="message">The message to display if directory is not within the path</param> | |
|
4046 | </member> | |
|
4047 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotWithin(System.IO.DirectoryInfo,System.IO.DirectoryInfo)"> | |
|
4048 | <summary> | |
|
4049 | Asserts that path does not contain actual as a subdirectory or | |
|
4050 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4051 | </summary> | |
|
4052 | <param name="directory">A directory to search</param> | |
|
4053 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4054 | </member> | |
|
4055 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotWithin(System.String,System.String,System.String,System.Object[])"> | |
|
4056 | <summary> | |
|
4057 | Asserts that path does not contain actual as a subdirectory or | |
|
4058 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4059 | </summary> | |
|
4060 | <param name="directory">A directory to search</param> | |
|
4061 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4062 | <param name="message">The message to display if directory is not within the path</param> | |
|
4063 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4064 | </member> | |
|
4065 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotWithin(System.String,System.String,System.String)"> | |
|
4066 | <summary> | |
|
4067 | Asserts that path does not contain actual as a subdirectory or | |
|
4068 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4069 | </summary> | |
|
4070 | <param name="directory">A directory to search</param> | |
|
4071 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4072 | <param name="message">The message to display if directory is not within the path</param> | |
|
4073 | </member> | |
|
4074 | <member name="M:NUnit.Framework.DirectoryAssert.IsNotWithin(System.String,System.String)"> | |
|
4075 | <summary> | |
|
4076 | Asserts that path does not contain actual as a subdirectory or | |
|
4077 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4078 | </summary> | |
|
4079 | <param name="directory">A directory to search</param> | |
|
4080 | <param name="actual">sub-directory asserted to exist under directory</param> | |
|
4081 | </member> | |
|
4082 | <member name="T:NUnit.Framework.FileAssert"> | |
|
4083 | <summary> | |
|
4084 | Summary description for FileAssert. | |
|
4085 | </summary> | |
|
4086 | </member> | |
|
4087 | <member name="M:NUnit.Framework.FileAssert.Equals(System.Object,System.Object)"> | |
|
4088 | <summary> | |
|
4089 | The Equals method throws an AssertionException. This is done | |
|
4090 | to make sure there is no mistake by calling this function. | |
|
4091 | </summary> | |
|
4092 | <param name="a"></param> | |
|
4093 | <param name="b"></param> | |
|
4094 | </member> | |
|
4095 | <member name="M:NUnit.Framework.FileAssert.ReferenceEquals(System.Object,System.Object)"> | |
|
4096 | <summary> | |
|
4097 | override the default ReferenceEquals to throw an AssertionException. This | |
|
4098 | implementation makes sure there is no mistake in calling this function | |
|
4099 | as part of Assert. | |
|
4100 | </summary> | |
|
4101 | <param name="a"></param> | |
|
4102 | <param name="b"></param> | |
|
4103 | </member> | |
|
4104 | <member name="M:NUnit.Framework.FileAssert.#ctor"> | |
|
4105 | <summary> | |
|
4106 | We don't actually want any instances of this object, but some people | |
|
4107 | like to inherit from it to add other static methods. Hence, the | |
|
4108 | protected constructor disallows any instances of this object. | |
|
4109 | </summary> | |
|
4110 | </member> | |
|
4111 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.IO.Stream,System.IO.Stream,System.String,System.Object[])"> | |
|
4112 | <summary> | |
|
4113 | Verifies that two Streams are equal. Two Streams are considered | |
|
4114 | equal if both are null, or if both have the same value byte for byte. | |
|
4115 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4116 | </summary> | |
|
4117 | <param name="expected">The expected Stream</param> | |
|
4118 | <param name="actual">The actual Stream</param> | |
|
4119 | <param name="message">The message to display if Streams are not equal</param> | |
|
4120 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4121 | </member> | |
|
4122 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.IO.Stream,System.IO.Stream,System.String)"> | |
|
4123 | <summary> | |
|
4124 | Verifies that two Streams are equal. Two Streams are considered | |
|
4125 | equal if both are null, or if both have the same value byte for byte. | |
|
4126 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4127 | </summary> | |
|
4128 | <param name="expected">The expected Stream</param> | |
|
4129 | <param name="actual">The actual Stream</param> | |
|
4130 | <param name="message">The message to display if objects are not equal</param> | |
|
4131 | </member> | |
|
4132 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.IO.Stream,System.IO.Stream)"> | |
|
4133 | <summary> | |
|
4134 | Verifies that two Streams are equal. Two Streams are considered | |
|
4135 | equal if both are null, or if both have the same value byte for byte. | |
|
4136 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4137 | </summary> | |
|
4138 | <param name="expected">The expected Stream</param> | |
|
4139 | <param name="actual">The actual Stream</param> | |
|
4140 | </member> | |
|
4141 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.IO.FileInfo,System.IO.FileInfo,System.String,System.Object[])"> | |
|
4142 | <summary> | |
|
4143 | Verifies that two files are equal. Two files are considered | |
|
4144 | equal if both are null, or if both have the same value byte for byte. | |
|
4145 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4146 | </summary> | |
|
4147 | <param name="expected">A file containing the value that is expected</param> | |
|
4148 | <param name="actual">A file containing the actual value</param> | |
|
4149 | <param name="message">The message to display if Streams are not equal</param> | |
|
4150 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4151 | </member> | |
|
4152 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.IO.FileInfo,System.IO.FileInfo,System.String)"> | |
|
4153 | <summary> | |
|
4154 | Verifies that two files are equal. Two files are considered | |
|
4155 | equal if both are null, or if both have the same value byte for byte. | |
|
4156 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4157 | </summary> | |
|
4158 | <param name="expected">A file containing the value that is expected</param> | |
|
4159 | <param name="actual">A file containing the actual value</param> | |
|
4160 | <param name="message">The message to display if objects are not equal</param> | |
|
4161 | </member> | |
|
4162 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.IO.FileInfo,System.IO.FileInfo)"> | |
|
4163 | <summary> | |
|
4164 | Verifies that two files are equal. Two files are considered | |
|
4165 | equal if both are null, or if both have the same value byte for byte. | |
|
4166 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4167 | </summary> | |
|
4168 | <param name="expected">A file containing the value that is expected</param> | |
|
4169 | <param name="actual">A file containing the actual value</param> | |
|
4170 | </member> | |
|
4171 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.String,System.String,System.String,System.Object[])"> | |
|
4172 | <summary> | |
|
4173 | Verifies that two files are equal. Two files are considered | |
|
4174 | equal if both are null, or if both have the same value byte for byte. | |
|
4175 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4176 | </summary> | |
|
4177 | <param name="expected">The path to a file containing the value that is expected</param> | |
|
4178 | <param name="actual">The path to a file containing the actual value</param> | |
|
4179 | <param name="message">The message to display if Streams are not equal</param> | |
|
4180 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4181 | </member> | |
|
4182 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.String,System.String,System.String)"> | |
|
4183 | <summary> | |
|
4184 | Verifies that two files are equal. Two files are considered | |
|
4185 | equal if both are null, or if both have the same value byte for byte. | |
|
4186 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4187 | </summary> | |
|
4188 | <param name="expected">The path to a file containing the value that is expected</param> | |
|
4189 | <param name="actual">The path to a file containing the actual value</param> | |
|
4190 | <param name="message">The message to display if objects are not equal</param> | |
|
4191 | </member> | |
|
4192 | <member name="M:NUnit.Framework.FileAssert.AreEqual(System.String,System.String)"> | |
|
4193 | <summary> | |
|
4194 | Verifies that two files are equal. Two files are considered | |
|
4195 | equal if both are null, or if both have the same value byte for byte. | |
|
4196 | If they are not equal an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4197 | </summary> | |
|
4198 | <param name="expected">The path to a file containing the value that is expected</param> | |
|
4199 | <param name="actual">The path to a file containing the actual value</param> | |
|
4200 | </member> | |
|
4201 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.IO.Stream,System.IO.Stream,System.String,System.Object[])"> | |
|
4202 | <summary> | |
|
4203 | Asserts that two Streams are not equal. If they are equal | |
|
4204 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4205 | </summary> | |
|
4206 | <param name="expected">The expected Stream</param> | |
|
4207 | <param name="actual">The actual Stream</param> | |
|
4208 | <param name="message">The message to be displayed when the two Stream are the same.</param> | |
|
4209 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4210 | </member> | |
|
4211 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.IO.Stream,System.IO.Stream,System.String)"> | |
|
4212 | <summary> | |
|
4213 | Asserts that two Streams are not equal. If they are equal | |
|
4214 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4215 | </summary> | |
|
4216 | <param name="expected">The expected Stream</param> | |
|
4217 | <param name="actual">The actual Stream</param> | |
|
4218 | <param name="message">The message to be displayed when the Streams are the same.</param> | |
|
4219 | </member> | |
|
4220 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.IO.Stream,System.IO.Stream)"> | |
|
4221 | <summary> | |
|
4222 | Asserts that two Streams are not equal. If they are equal | |
|
4223 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4224 | </summary> | |
|
4225 | <param name="expected">The expected Stream</param> | |
|
4226 | <param name="actual">The actual Stream</param> | |
|
4227 | </member> | |
|
4228 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.IO.FileInfo,System.IO.FileInfo,System.String,System.Object[])"> | |
|
4229 | <summary> | |
|
4230 | Asserts that two files are not equal. If they are equal | |
|
4231 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4232 | </summary> | |
|
4233 | <param name="expected">A file containing the value that is expected</param> | |
|
4234 | <param name="actual">A file containing the actual value</param> | |
|
4235 | <param name="message">The message to display if Streams are not equal</param> | |
|
4236 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4237 | </member> | |
|
4238 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.IO.FileInfo,System.IO.FileInfo,System.String)"> | |
|
4239 | <summary> | |
|
4240 | Asserts that two files are not equal. If they are equal | |
|
4241 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4242 | </summary> | |
|
4243 | <param name="expected">A file containing the value that is expected</param> | |
|
4244 | <param name="actual">A file containing the actual value</param> | |
|
4245 | <param name="message">The message to display if objects are not equal</param> | |
|
4246 | </member> | |
|
4247 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.IO.FileInfo,System.IO.FileInfo)"> | |
|
4248 | <summary> | |
|
4249 | Asserts that two files are not equal. If they are equal | |
|
4250 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4251 | </summary> | |
|
4252 | <param name="expected">A file containing the value that is expected</param> | |
|
4253 | <param name="actual">A file containing the actual value</param> | |
|
4254 | </member> | |
|
4255 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.String,System.String,System.String,System.Object[])"> | |
|
4256 | <summary> | |
|
4257 | Asserts that two files are not equal. If they are equal | |
|
4258 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4259 | </summary> | |
|
4260 | <param name="expected">The path to a file containing the value that is expected</param> | |
|
4261 | <param name="actual">The path to a file containing the actual value</param> | |
|
4262 | <param name="message">The message to display if Streams are not equal</param> | |
|
4263 | <param name="args">Arguments to be used in formatting the message</param> | |
|
4264 | </member> | |
|
4265 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.String,System.String,System.String)"> | |
|
4266 | <summary> | |
|
4267 | Asserts that two files are not equal. If they are equal | |
|
4268 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4269 | </summary> | |
|
4270 | <param name="expected">The path to a file containing the value that is expected</param> | |
|
4271 | <param name="actual">The path to a file containing the actual value</param> | |
|
4272 | <param name="message">The message to display if objects are not equal</param> | |
|
4273 | </member> | |
|
4274 | <member name="M:NUnit.Framework.FileAssert.AreNotEqual(System.String,System.String)"> | |
|
4275 | <summary> | |
|
4276 | Asserts that two files are not equal. If they are equal | |
|
4277 | an <see cref="T:NUnit.Framework.AssertionException"/> is thrown. | |
|
4278 | </summary> | |
|
4279 | <param name="expected">The path to a file containing the value that is expected</param> | |
|
4280 | <param name="actual">The path to a file containing the actual value</param> | |
|
4281 | </member> | |
|
4282 | <member name="T:NUnit.Framework.GlobalSettings"> | |
|
4283 | <summary> | |
|
4284 | GlobalSettings is a place for setting default values used | |
|
4285 | by the framework in performing asserts. | |
|
4286 | </summary> | |
|
4287 | </member> | |
|
4288 | <member name="F:NUnit.Framework.GlobalSettings.DefaultFloatingPointTolerance"> | |
|
4289 | <summary> | |
|
4290 | Default tolerance for floating point equality | |
|
4291 | </summary> | |
|
4292 | </member> | |
|
4293 | <member name="T:NUnit.Framework.Guard"> | |
|
4294 | <summary> | |
|
4295 | Class used to guard against unexpected argument values | |
|
4296 | by throwing an appropriate exception. | |
|
4297 | </summary> | |
|
4298 | </member> | |
|
4299 | <member name="M:NUnit.Framework.Guard.ArgumentNotNull(System.Object,System.String)"> | |
|
4300 | <summary> | |
|
4301 | Throws an exception if an argument is null | |
|
4302 | </summary> | |
|
4303 | <param name="value">The value to be tested</param> | |
|
4304 | <param name="name">The name of the argument</param> | |
|
4305 | </member> | |
|
4306 | <member name="M:NUnit.Framework.Guard.ArgumentNotNullOrEmpty(System.String,System.String)"> | |
|
4307 | <summary> | |
|
4308 | Throws an exception if a string argument is null or empty | |
|
4309 | </summary> | |
|
4310 | <param name="value">The value to be tested</param> | |
|
4311 | <param name="name">The name of the argument</param> | |
|
4312 | </member> | |
|
4313 | <member name="T:NUnit.Framework.Has"> | |
|
4314 | <summary> | |
|
4315 | Helper class with properties and methods that supply | |
|
4316 | a number of constraints used in Asserts. | |
|
4317 | </summary> | |
|
4318 | </member> | |
|
4319 | <member name="M:NUnit.Framework.Has.Exactly(System.Int32)"> | |
|
4320 | <summary> | |
|
4321 | Returns a ConstraintExpression, which will apply | |
|
4322 | the following constraint to all members of a collection, | |
|
4323 | succeeding only if a specified number of them succeed. | |
|
4324 | </summary> | |
|
4325 | </member> | |
|
4326 | <member name="M:NUnit.Framework.Has.Property(System.String)"> | |
|
4327 | <summary> | |
|
4328 | Returns a new PropertyConstraintExpression, which will either | |
|
4329 | test for the existence of the named property on the object | |
|
4330 | being tested or apply any following constraint to that property. | |
|
4331 | </summary> | |
|
4332 | </member> | |
|
4333 | <member name="M:NUnit.Framework.Has.Attribute(System.Type)"> | |
|
4334 | <summary> | |
|
4335 | Returns a new AttributeConstraint checking for the | |
|
4336 | presence of a particular attribute on an object. | |
|
4337 | </summary> | |
|
4338 | </member> | |
|
4339 | <member name="M:NUnit.Framework.Has.Attribute``1"> | |
|
4340 | <summary> | |
|
4341 | Returns a new AttributeConstraint checking for the | |
|
4342 | presence of a particular attribute on an object. | |
|
4343 | </summary> | |
|
4344 | </member> | |
|
4345 | <member name="M:NUnit.Framework.Has.Member(System.Object)"> | |
|
4346 | <summary> | |
|
4347 | Returns a new CollectionContainsConstraint checking for the | |
|
4348 | presence of a particular object in the collection. | |
|
4349 | </summary> | |
|
4350 | </member> | |
|
4351 | <member name="P:NUnit.Framework.Has.No"> | |
|
4352 | <summary> | |
|
4353 | Returns a ConstraintExpression that negates any | |
|
4354 | following constraint. | |
|
4355 | </summary> | |
|
4356 | </member> | |
|
4357 | <member name="P:NUnit.Framework.Has.All"> | |
|
4358 | <summary> | |
|
4359 | Returns a ConstraintExpression, which will apply | |
|
4360 | the following constraint to all members of a collection, | |
|
4361 | succeeding if all of them succeed. | |
|
4362 | </summary> | |
|
4363 | </member> | |
|
4364 | <member name="P:NUnit.Framework.Has.Some"> | |
|
4365 | <summary> | |
|
4366 | Returns a ConstraintExpression, which will apply | |
|
4367 | the following constraint to all members of a collection, | |
|
4368 | succeeding if at least one of them succeeds. | |
|
4369 | </summary> | |
|
4370 | </member> | |
|
4371 | <member name="P:NUnit.Framework.Has.None"> | |
|
4372 | <summary> | |
|
4373 | Returns a ConstraintExpression, which will apply | |
|
4374 | the following constraint to all members of a collection, | |
|
4375 | succeeding if all of them fail. | |
|
4376 | </summary> | |
|
4377 | </member> | |
|
4378 | <member name="P:NUnit.Framework.Has.Length"> | |
|
4379 | <summary> | |
|
4380 | Returns a new ConstraintExpression, which will apply the following | |
|
4381 | constraint to the Length property of the object being tested. | |
|
4382 | </summary> | |
|
4383 | </member> | |
|
4384 | <member name="P:NUnit.Framework.Has.Count"> | |
|
4385 | <summary> | |
|
4386 | Returns a new ConstraintExpression, which will apply the following | |
|
4387 | constraint to the Count property of the object being tested. | |
|
4388 | </summary> | |
|
4389 | </member> | |
|
4390 | <member name="P:NUnit.Framework.Has.Message"> | |
|
4391 | <summary> | |
|
4392 | Returns a new ConstraintExpression, which will apply the following | |
|
4393 | constraint to the Message property of the object being tested. | |
|
4394 | </summary> | |
|
4395 | </member> | |
|
4396 | <member name="P:NUnit.Framework.Has.InnerException"> | |
|
4397 | <summary> | |
|
4398 | Returns a new ConstraintExpression, which will apply the following | |
|
4399 | constraint to the InnerException property of the object being tested. | |
|
4400 | </summary> | |
|
4401 | </member> | |
|
4402 | <member name="T:NUnit.Framework.IExpectException"> | |
|
4403 | <summary> | |
|
4404 | Interface implemented by a user fixture in order to | |
|
4405 | validate any expected exceptions. It is only called | |
|
4406 | for test methods marked with the ExpectedException | |
|
4407 | attribute. | |
|
4408 | </summary> | |
|
4409 | </member> | |
|
4410 | <member name="M:NUnit.Framework.IExpectException.HandleException(System.Exception)"> | |
|
4411 | <summary> | |
|
4412 | Method to handle an expected exception | |
|
4413 | </summary> | |
|
4414 | <param name="ex">The exception to be handled</param> | |
|
4415 | </member> | |
|
4416 | <member name="T:NUnit.Framework.Is"> | |
|
4417 | <summary> | |
|
4418 | Helper class with properties and methods that supply | |
|
4419 | a number of constraints used in Asserts. | |
|
4420 | </summary> | |
|
4421 | </member> | |
|
4422 | <member name="M:NUnit.Framework.Is.EqualTo(System.Object)"> | |
|
4423 | <summary> | |
|
4424 | Returns a constraint that tests two items for equality | |
|
4425 | </summary> | |
|
4426 | </member> | |
|
4427 | <member name="M:NUnit.Framework.Is.SameAs(System.Object)"> | |
|
4428 | <summary> | |
|
4429 | Returns a constraint that tests that two references are the same object | |
|
4430 | </summary> | |
|
4431 | </member> | |
|
4432 | <member name="M:NUnit.Framework.Is.GreaterThan(System.Object)"> | |
|
4433 | <summary> | |
|
4434 | Returns a constraint that tests whether the | |
|
4435 | actual value is greater than the suppled argument | |
|
4436 | </summary> | |
|
4437 | </member> | |
|
4438 | <member name="M:NUnit.Framework.Is.GreaterThanOrEqualTo(System.Object)"> | |
|
4439 | <summary> | |
|
4440 | Returns a constraint that tests whether the | |
|
4441 | actual value is greater than or equal to the suppled argument | |
|
4442 | </summary> | |
|
4443 | </member> | |
|
4444 | <member name="M:NUnit.Framework.Is.AtLeast(System.Object)"> | |
|
4445 | <summary> | |
|
4446 | Returns a constraint that tests whether the | |
|
4447 | actual value is greater than or equal to the suppled argument | |
|
4448 | </summary> | |
|
4449 | </member> | |
|
4450 | <member name="M:NUnit.Framework.Is.LessThan(System.Object)"> | |
|
4451 | <summary> | |
|
4452 | Returns a constraint that tests whether the | |
|
4453 | actual value is less than the suppled argument | |
|
4454 | </summary> | |
|
4455 | </member> | |
|
4456 | <member name="M:NUnit.Framework.Is.LessThanOrEqualTo(System.Object)"> | |
|
4457 | <summary> | |
|
4458 | Returns a constraint that tests whether the | |
|
4459 | actual value is less than or equal to the suppled argument | |
|
4460 | </summary> | |
|
4461 | </member> | |
|
4462 | <member name="M:NUnit.Framework.Is.AtMost(System.Object)"> | |
|
4463 | <summary> | |
|
4464 | Returns a constraint that tests whether the | |
|
4465 | actual value is less than or equal to the suppled argument | |
|
4466 | </summary> | |
|
4467 | </member> | |
|
4468 | <member name="M:NUnit.Framework.Is.TypeOf(System.Type)"> | |
|
4469 | <summary> | |
|
4470 | Returns a constraint that tests whether the actual | |
|
4471 | value is of the exact type supplied as an argument. | |
|
4472 | </summary> | |
|
4473 | </member> | |
|
4474 | <member name="M:NUnit.Framework.Is.TypeOf``1"> | |
|
4475 | <summary> | |
|
4476 | Returns a constraint that tests whether the actual | |
|
4477 | value is of the exact type supplied as an argument. | |
|
4478 | </summary> | |
|
4479 | </member> | |
|
4480 | <member name="M:NUnit.Framework.Is.InstanceOf(System.Type)"> | |
|
4481 | <summary> | |
|
4482 | Returns a constraint that tests whether the actual value | |
|
4483 | is of the type supplied as an argument or a derived type. | |
|
4484 | </summary> | |
|
4485 | </member> | |
|
4486 | <member name="M:NUnit.Framework.Is.InstanceOf``1"> | |
|
4487 | <summary> | |
|
4488 | Returns a constraint that tests whether the actual value | |
|
4489 | is of the type supplied as an argument or a derived type. | |
|
4490 | </summary> | |
|
4491 | </member> | |
|
4492 | <member name="M:NUnit.Framework.Is.InstanceOfType(System.Type)"> | |
|
4493 | <summary> | |
|
4494 | Returns a constraint that tests whether the actual value | |
|
4495 | is of the type supplied as an argument or a derived type. | |
|
4496 | </summary> | |
|
4497 | </member> | |
|
4498 | <member name="M:NUnit.Framework.Is.InstanceOfType``1"> | |
|
4499 | <summary> | |
|
4500 | Returns a constraint that tests whether the actual value | |
|
4501 | is of the type supplied as an argument or a derived type. | |
|
4502 | </summary> | |
|
4503 | </member> | |
|
4504 | <member name="M:NUnit.Framework.Is.AssignableFrom(System.Type)"> | |
|
4505 | <summary> | |
|
4506 | Returns a constraint that tests whether the actual value | |
|
4507 | is assignable from the type supplied as an argument. | |
|
4508 | </summary> | |
|
4509 | </member> | |
|
4510 | <member name="M:NUnit.Framework.Is.AssignableFrom``1"> | |
|
4511 | <summary> | |
|
4512 | Returns a constraint that tests whether the actual value | |
|
4513 | is assignable from the type supplied as an argument. | |
|
4514 | </summary> | |
|
4515 | </member> | |
|
4516 | <member name="M:NUnit.Framework.Is.AssignableTo(System.Type)"> | |
|
4517 | <summary> | |
|
4518 | Returns a constraint that tests whether the actual value | |
|
4519 | is assignable from the type supplied as an argument. | |
|
4520 | </summary> | |
|
4521 | </member> | |
|
4522 | <member name="M:NUnit.Framework.Is.AssignableTo``1"> | |
|
4523 | <summary> | |
|
4524 | Returns a constraint that tests whether the actual value | |
|
4525 | is assignable from the type supplied as an argument. | |
|
4526 | </summary> | |
|
4527 | </member> | |
|
4528 | <member name="M:NUnit.Framework.Is.EquivalentTo(System.Collections.IEnumerable)"> | |
|
4529 | <summary> | |
|
4530 | Returns a constraint that tests whether the actual value | |
|
4531 | is a collection containing the same elements as the | |
|
4532 | collection supplied as an argument. | |
|
4533 | </summary> | |
|
4534 | </member> | |
|
4535 | <member name="M:NUnit.Framework.Is.SubsetOf(System.Collections.IEnumerable)"> | |
|
4536 | <summary> | |
|
4537 | Returns a constraint that tests whether the actual value | |
|
4538 | is a subset of the collection supplied as an argument. | |
|
4539 | </summary> | |
|
4540 | </member> | |
|
4541 | <member name="M:NUnit.Framework.Is.StringContaining(System.String)"> | |
|
4542 | <summary> | |
|
4543 | Returns a constraint that succeeds if the actual | |
|
4544 | value contains the substring supplied as an argument. | |
|
4545 | </summary> | |
|
4546 | </member> | |
|
4547 | <member name="M:NUnit.Framework.Is.StringStarting(System.String)"> | |
|
4548 | <summary> | |
|
4549 | Returns a constraint that succeeds if the actual | |
|
4550 | value starts with the substring supplied as an argument. | |
|
4551 | </summary> | |
|
4552 | </member> | |
|
4553 | <member name="M:NUnit.Framework.Is.StringEnding(System.String)"> | |
|
4554 | <summary> | |
|
4555 | Returns a constraint that succeeds if the actual | |
|
4556 | value ends with the substring supplied as an argument. | |
|
4557 | </summary> | |
|
4558 | </member> | |
|
4559 | <member name="M:NUnit.Framework.Is.StringMatching(System.String)"> | |
|
4560 | <summary> | |
|
4561 | Returns a constraint that succeeds if the actual | |
|
4562 | value matches the regular expression supplied as an argument. | |
|
4563 | </summary> | |
|
4564 | </member> | |
|
4565 | <member name="M:NUnit.Framework.Is.SamePath(System.String)"> | |
|
4566 | <summary> | |
|
4567 | Returns a constraint that tests whether the path provided | |
|
4568 | is the same as an expected path after canonicalization. | |
|
4569 | </summary> | |
|
4570 | </member> | |
|
4571 | <member name="M:NUnit.Framework.Is.SubPath(System.String)"> | |
|
4572 | <summary> | |
|
4573 | Returns a constraint that tests whether the path provided | |
|
4574 | is under an expected path after canonicalization. | |
|
4575 | </summary> | |
|
4576 | </member> | |
|
4577 | <member name="M:NUnit.Framework.Is.SamePathOrUnder(System.String)"> | |
|
4578 | <summary> | |
|
4579 | Returns a constraint that tests whether the path provided | |
|
4580 | is the same path or under an expected path after canonicalization. | |
|
4581 | </summary> | |
|
4582 | </member> | |
|
4583 | <member name="M:NUnit.Framework.Is.InRange``1(``0,``0)"> | |
|
4584 | <summary> | |
|
4585 | Returns a constraint that tests whether the actual value falls | |
|
4586 | within a specified range. | |
|
4587 | </summary> | |
|
4588 | </member> | |
|
4589 | <member name="P:NUnit.Framework.Is.Not"> | |
|
4590 | <summary> | |
|
4591 | Returns a ConstraintExpression that negates any | |
|
4592 | following constraint. | |
|
4593 | </summary> | |
|
4594 | </member> | |
|
4595 | <member name="P:NUnit.Framework.Is.All"> | |
|
4596 | <summary> | |
|
4597 | Returns a ConstraintExpression, which will apply | |
|
4598 | the following constraint to all members of a collection, | |
|
4599 | succeeding if all of them succeed. | |
|
4600 | </summary> | |
|
4601 | </member> | |
|
4602 | <member name="P:NUnit.Framework.Is.Null"> | |
|
4603 | <summary> | |
|
4604 | Returns a constraint that tests for null | |
|
4605 | </summary> | |
|
4606 | </member> | |
|
4607 | <member name="P:NUnit.Framework.Is.True"> | |
|
4608 | <summary> | |
|
4609 | Returns a constraint that tests for True | |
|
4610 | </summary> | |
|
4611 | </member> | |
|
4612 | <member name="P:NUnit.Framework.Is.False"> | |
|
4613 | <summary> | |
|
4614 | Returns a constraint that tests for False | |
|
4615 | </summary> | |
|
4616 | </member> | |
|
4617 | <member name="P:NUnit.Framework.Is.Positive"> | |
|
4618 | <summary> | |
|
4619 | Returns a constraint that tests for a positive value | |
|
4620 | </summary> | |
|
4621 | </member> | |
|
4622 | <member name="P:NUnit.Framework.Is.Negative"> | |
|
4623 | <summary> | |
|
4624 | Returns a constraint that tests for a negative value | |
|
4625 | </summary> | |
|
4626 | </member> | |
|
4627 | <member name="P:NUnit.Framework.Is.NaN"> | |
|
4628 | <summary> | |
|
4629 | Returns a constraint that tests for NaN | |
|
4630 | </summary> | |
|
4631 | </member> | |
|
4632 | <member name="P:NUnit.Framework.Is.Empty"> | |
|
4633 | <summary> | |
|
4634 | Returns a constraint that tests for empty | |
|
4635 | </summary> | |
|
4636 | </member> | |
|
4637 | <member name="P:NUnit.Framework.Is.Unique"> | |
|
4638 | <summary> | |
|
4639 | Returns a constraint that tests whether a collection | |
|
4640 | contains all unique items. | |
|
4641 | </summary> | |
|
4642 | </member> | |
|
4643 | <member name="P:NUnit.Framework.Is.BinarySerializable"> | |
|
4644 | <summary> | |
|
4645 | Returns a constraint that tests whether an object graph is serializable in binary format. | |
|
4646 | </summary> | |
|
4647 | </member> | |
|
4648 | <member name="P:NUnit.Framework.Is.XmlSerializable"> | |
|
4649 | <summary> | |
|
4650 | Returns a constraint that tests whether an object graph is serializable in xml format. | |
|
4651 | </summary> | |
|
4652 | </member> | |
|
4653 | <member name="P:NUnit.Framework.Is.Ordered"> | |
|
4654 | <summary> | |
|
4655 | Returns a constraint that tests whether a collection is ordered | |
|
4656 | </summary> | |
|
4657 | </member> | |
|
4658 | <member name="T:NUnit.Framework.ITestCaseData"> | |
|
4659 | <summary> | |
|
4660 | The ITestCaseData interface is implemented by a class | |
|
4661 | that is able to return complete testcases for use by | |
|
4662 | a parameterized test method. | |
|
4663 | ||
|
4664 | NOTE: This interface is used in both the framework | |
|
4665 | and the core, even though that results in two different | |
|
4666 | types. However, sharing the source code guarantees that | |
|
4667 | the various implementations will be compatible and that | |
|
4668 | the core is able to reflect successfully over the | |
|
4669 | framework implementations of ITestCaseData. | |
|
4670 | </summary> | |
|
4671 | </member> | |
|
4672 | <member name="P:NUnit.Framework.ITestCaseData.Arguments"> | |
|
4673 | <summary> | |
|
4674 | Gets the argument list to be provided to the test | |
|
4675 | </summary> | |
|
4676 | </member> | |
|
4677 | <member name="P:NUnit.Framework.ITestCaseData.Result"> | |
|
4678 | <summary> | |
|
4679 | Gets the expected result | |
|
4680 | </summary> | |
|
4681 | </member> | |
|
4682 | <member name="P:NUnit.Framework.ITestCaseData.HasExpectedResult"> | |
|
4683 | <summary> | |
|
4684 | Indicates whether a result has been specified. | |
|
4685 | This is necessary because the result may be | |
|
4686 | null, so it's value cannot be checked. | |
|
4687 | </summary> | |
|
4688 | </member> | |
|
4689 | <member name="P:NUnit.Framework.ITestCaseData.ExpectedException"> | |
|
4690 | <summary> | |
|
4691 | Gets the expected exception Type | |
|
4692 | </summary> | |
|
4693 | </member> | |
|
4694 | <member name="P:NUnit.Framework.ITestCaseData.ExpectedExceptionName"> | |
|
4695 | <summary> | |
|
4696 | Gets the FullName of the expected exception | |
|
4697 | </summary> | |
|
4698 | </member> | |
|
4699 | <member name="P:NUnit.Framework.ITestCaseData.TestName"> | |
|
4700 | <summary> | |
|
4701 | Gets the name to be used for the test | |
|
4702 | </summary> | |
|
4703 | </member> | |
|
4704 | <member name="P:NUnit.Framework.ITestCaseData.Description"> | |
|
4705 | <summary> | |
|
4706 | Gets the description of the test | |
|
4707 | </summary> | |
|
4708 | </member> | |
|
4709 | <member name="P:NUnit.Framework.ITestCaseData.Ignored"> | |
|
4710 | <summary> | |
|
4711 | Gets a value indicating whether this <see cref="T:NUnit.Framework.ITestCaseData"/> is ignored. | |
|
4712 | </summary> | |
|
4713 | <value><c>true</c> if ignored; otherwise, <c>false</c>.</value> | |
|
4714 | </member> | |
|
4715 | <member name="P:NUnit.Framework.ITestCaseData.Explicit"> | |
|
4716 | <summary> | |
|
4717 | Gets a value indicating whether this <see cref="T:NUnit.Framework.ITestCaseData"/> is explicit. | |
|
4718 | </summary> | |
|
4719 | <value><c>true</c> if explicit; otherwise, <c>false</c>.</value> | |
|
4720 | </member> | |
|
4721 | <member name="P:NUnit.Framework.ITestCaseData.IgnoreReason"> | |
|
4722 | <summary> | |
|
4723 | Gets the ignore reason. | |
|
4724 | </summary> | |
|
4725 | <value>The ignore reason.</value> | |
|
4726 | </member> | |
|
4727 | <member name="T:NUnit.Framework.Iz"> | |
|
4728 | <summary> | |
|
4729 | The Iz class is a synonym for Is intended for use in VB, | |
|
4730 | which regards Is as a keyword. | |
|
4731 | </summary> | |
|
4732 | </member> | |
|
4733 | <member name="T:NUnit.Framework.List"> | |
|
4734 | <summary> | |
|
4735 | The List class is a helper class with properties and methods | |
|
4736 | that supply a number of constraints used with lists and collections. | |
|
4737 | </summary> | |
|
4738 | </member> | |
|
4739 | <member name="M:NUnit.Framework.List.Map(System.Collections.ICollection)"> | |
|
4740 | <summary> | |
|
4741 | List.Map returns a ListMapper, which can be used to map | |
|
4742 | the original collection to another collection. | |
|
4743 | </summary> | |
|
4744 | <param name="actual"></param> | |
|
4745 | <returns></returns> | |
|
4746 | </member> | |
|
4747 | <member name="T:NUnit.Framework.ListMapper"> | |
|
4748 | <summary> | |
|
4749 | ListMapper is used to transform a collection used as an actual argument | |
|
4750 | producing another collection to be used in the assertion. | |
|
4751 | </summary> | |
|
4752 | </member> | |
|
4753 | <member name="M:NUnit.Framework.ListMapper.#ctor(System.Collections.ICollection)"> | |
|
4754 | <summary> | |
|
4755 | Construct a ListMapper based on a collection | |
|
4756 | </summary> | |
|
4757 | <param name="original">The collection to be transformed</param> | |
|
4758 | </member> | |
|
4759 | <member name="M:NUnit.Framework.ListMapper.Property(System.String)"> | |
|
4760 | <summary> | |
|
4761 | Produces a collection containing all the values of a property | |
|
4762 | </summary> | |
|
4763 | <param name="name">The collection of property values</param> | |
|
4764 | <returns></returns> | |
|
4765 | </member> | |
|
4766 | <member name="T:NUnit.Framework.Randomizer"> | |
|
4767 | <summary> | |
|
4768 | Randomizer returns a set of random values in a repeatable | |
|
4769 | way, to allow re-running of tests if necessary. | |
|
4770 | </summary> | |
|
4771 | </member> | |
|
4772 | <member name="M:NUnit.Framework.Randomizer.GetRandomizer(System.Reflection.MemberInfo)"> | |
|
4773 | <summary> | |
|
4774 | Get a randomizer for a particular member, returning | |
|
4775 | one that has already been created if it exists. | |
|
4776 | This ensures that the same values are generated | |
|
4777 | each time the tests are reloaded. | |
|
4778 | </summary> | |
|
4779 | </member> | |
|
4780 | <member name="M:NUnit.Framework.Randomizer.GetRandomizer(System.Reflection.ParameterInfo)"> | |
|
4781 | <summary> | |
|
4782 | Get a randomizer for a particular parameter, returning | |
|
4783 | one that has already been created if it exists. | |
|
4784 | This ensures that the same values are generated | |
|
4785 | each time the tests are reloaded. | |
|
4786 | </summary> | |
|
4787 | </member> | |
|
4788 | <member name="M:NUnit.Framework.Randomizer.#ctor"> | |
|
4789 | <summary> | |
|
4790 | Construct a randomizer using a random seed | |
|
4791 | </summary> | |
|
4792 | </member> | |
|
4793 | <member name="M:NUnit.Framework.Randomizer.#ctor(System.Int32)"> | |
|
4794 | <summary> | |
|
4795 | Construct a randomizer using a specified seed | |
|
4796 | </summary> | |
|
4797 | </member> | |
|
4798 | <member name="M:NUnit.Framework.Randomizer.GetDoubles(System.Int32)"> | |
|
4799 | <summary> | |
|
4800 | Return an array of random doubles between 0.0 and 1.0. | |
|
4801 | </summary> | |
|
4802 | <param name="count"></param> | |
|
4803 | <returns></returns> | |
|
4804 | </member> | |
|
4805 | <member name="M:NUnit.Framework.Randomizer.GetDoubles(System.Double,System.Double,System.Int32)"> | |
|
4806 | <summary> | |
|
4807 | Return an array of random doubles with values in a specified range. | |
|
4808 | </summary> | |
|
4809 | </member> | |
|
4810 | <member name="M:NUnit.Framework.Randomizer.GetInts(System.Int32,System.Int32,System.Int32)"> | |
|
4811 | <summary> | |
|
4812 | Return an array of random ints with values in a specified range. | |
|
4813 | </summary> | |
|
4814 | </member> | |
|
4815 | <member name="P:NUnit.Framework.Randomizer.RandomSeed"> | |
|
4816 | <summary> | |
|
4817 | Get a random seed for use in creating a randomizer. | |
|
4818 | </summary> | |
|
4819 | </member> | |
|
4820 | <member name="T:NUnit.Framework.SpecialValue"> | |
|
4821 | <summary> | |
|
4822 | The SpecialValue enum is used to represent TestCase arguments | |
|
4823 | that cannot be used as arguments to an Attribute. | |
|
4824 | </summary> | |
|
4825 | </member> | |
|
4826 | <member name="F:NUnit.Framework.SpecialValue.Null"> | |
|
4827 | <summary> | |
|
4828 | Null represents a null value, which cannot be used as an | |
|
4829 | argument to an attribute under .NET 1.x | |
|
4830 | </summary> | |
|
4831 | </member> | |
|
4832 | <member name="T:NUnit.Framework.StringAssert"> | |
|
4833 | <summary> | |
|
4834 | Basic Asserts on strings. | |
|
4835 | </summary> | |
|
4836 | </member> | |
|
4837 | <member name="M:NUnit.Framework.StringAssert.Equals(System.Object,System.Object)"> | |
|
4838 | <summary> | |
|
4839 | The Equals method throws an AssertionException. This is done | |
|
4840 | to make sure there is no mistake by calling this function. | |
|
4841 | </summary> | |
|
4842 | <param name="a"></param> | |
|
4843 | <param name="b"></param> | |
|
4844 | </member> | |
|
4845 | <member name="M:NUnit.Framework.StringAssert.ReferenceEquals(System.Object,System.Object)"> | |
|
4846 | <summary> | |
|
4847 | override the default ReferenceEquals to throw an AssertionException. This | |
|
4848 | implementation makes sure there is no mistake in calling this function | |
|
4849 | as part of Assert. | |
|
4850 | </summary> | |
|
4851 | <param name="a"></param> | |
|
4852 | <param name="b"></param> | |
|
4853 | </member> | |
|
4854 | <member name="M:NUnit.Framework.StringAssert.Contains(System.String,System.String,System.String,System.Object[])"> | |
|
4855 | <summary> | |
|
4856 | Asserts that a string is found within another string. | |
|
4857 | </summary> | |
|
4858 | <param name="expected">The expected string</param> | |
|
4859 | <param name="actual">The string to be examined</param> | |
|
4860 | <param name="message">The message to display in case of failure</param> | |
|
4861 | <param name="args">Arguments used in formatting the message</param> | |
|
4862 | </member> | |
|
4863 | <member name="M:NUnit.Framework.StringAssert.Contains(System.String,System.String,System.String)"> | |
|
4864 | <summary> | |
|
4865 | Asserts that a string is found within another string. | |
|
4866 | </summary> | |
|
4867 | <param name="expected">The expected string</param> | |
|
4868 | <param name="actual">The string to be examined</param> | |
|
4869 | <param name="message">The message to display in case of failure</param> | |
|
4870 | </member> | |
|
4871 | <member name="M:NUnit.Framework.StringAssert.Contains(System.String,System.String)"> | |
|
4872 | <summary> | |
|
4873 | Asserts that a string is found within another string. | |
|
4874 | </summary> | |
|
4875 | <param name="expected">The expected string</param> | |
|
4876 | <param name="actual">The string to be examined</param> | |
|
4877 | </member> | |
|
4878 | <member name="M:NUnit.Framework.StringAssert.DoesNotContain(System.String,System.String,System.String,System.Object[])"> | |
|
4879 | <summary> | |
|
4880 | Asserts that a string is not found within another string. | |
|
4881 | </summary> | |
|
4882 | <param name="expected">The expected string</param> | |
|
4883 | <param name="actual">The string to be examined</param> | |
|
4884 | <param name="message">The message to display in case of failure</param> | |
|
4885 | <param name="args">Arguments used in formatting the message</param> | |
|
4886 | </member> | |
|
4887 | <member name="M:NUnit.Framework.StringAssert.DoesNotContain(System.String,System.String,System.String)"> | |
|
4888 | <summary> | |
|
4889 | Asserts that a string is found within another string. | |
|
4890 | </summary> | |
|
4891 | <param name="expected">The expected string</param> | |
|
4892 | <param name="actual">The string to be examined</param> | |
|
4893 | <param name="message">The message to display in case of failure</param> | |
|
4894 | </member> | |
|
4895 | <member name="M:NUnit.Framework.StringAssert.DoesNotContain(System.String,System.String)"> | |
|
4896 | <summary> | |
|
4897 | Asserts that a string is found within another string. | |
|
4898 | </summary> | |
|
4899 | <param name="expected">The expected string</param> | |
|
4900 | <param name="actual">The string to be examined</param> | |
|
4901 | </member> | |
|
4902 | <member name="M:NUnit.Framework.StringAssert.StartsWith(System.String,System.String,System.String,System.Object[])"> | |
|
4903 | <summary> | |
|
4904 | Asserts that a string starts with another string. | |
|
4905 | </summary> | |
|
4906 | <param name="expected">The expected string</param> | |
|
4907 | <param name="actual">The string to be examined</param> | |
|
4908 | <param name="message">The message to display in case of failure</param> | |
|
4909 | <param name="args">Arguments used in formatting the message</param> | |
|
4910 | </member> | |
|
4911 | <member name="M:NUnit.Framework.StringAssert.StartsWith(System.String,System.String,System.String)"> | |
|
4912 | <summary> | |
|
4913 | Asserts that a string starts with another string. | |
|
4914 | </summary> | |
|
4915 | <param name="expected">The expected string</param> | |
|
4916 | <param name="actual">The string to be examined</param> | |
|
4917 | <param name="message">The message to display in case of failure</param> | |
|
4918 | </member> | |
|
4919 | <member name="M:NUnit.Framework.StringAssert.StartsWith(System.String,System.String)"> | |
|
4920 | <summary> | |
|
4921 | Asserts that a string starts with another string. | |
|
4922 | </summary> | |
|
4923 | <param name="expected">The expected string</param> | |
|
4924 | <param name="actual">The string to be examined</param> | |
|
4925 | </member> | |
|
4926 | <member name="M:NUnit.Framework.StringAssert.DoesNotStartWith(System.String,System.String,System.String,System.Object[])"> | |
|
4927 | <summary> | |
|
4928 | Asserts that a string does not start with another string. | |
|
4929 | </summary> | |
|
4930 | <param name="expected">The expected string</param> | |
|
4931 | <param name="actual">The string to be examined</param> | |
|
4932 | <param name="message">The message to display in case of failure</param> | |
|
4933 | <param name="args">Arguments used in formatting the message</param> | |
|
4934 | </member> | |
|
4935 | <member name="M:NUnit.Framework.StringAssert.DoesNotStartWith(System.String,System.String,System.String)"> | |
|
4936 | <summary> | |
|
4937 | Asserts that a string does not start with another string. | |
|
4938 | </summary> | |
|
4939 | <param name="expected">The expected string</param> | |
|
4940 | <param name="actual">The string to be examined</param> | |
|
4941 | <param name="message">The message to display in case of failure</param> | |
|
4942 | </member> | |
|
4943 | <member name="M:NUnit.Framework.StringAssert.DoesNotStartWith(System.String,System.String)"> | |
|
4944 | <summary> | |
|
4945 | Asserts that a string does not start with another string. | |
|
4946 | </summary> | |
|
4947 | <param name="expected">The expected string</param> | |
|
4948 | <param name="actual">The string to be examined</param> | |
|
4949 | </member> | |
|
4950 | <member name="M:NUnit.Framework.StringAssert.EndsWith(System.String,System.String,System.String,System.Object[])"> | |
|
4951 | <summary> | |
|
4952 | Asserts that a string ends with another string. | |
|
4953 | </summary> | |
|
4954 | <param name="expected">The expected string</param> | |
|
4955 | <param name="actual">The string to be examined</param> | |
|
4956 | <param name="message">The message to display in case of failure</param> | |
|
4957 | <param name="args">Arguments used in formatting the message</param> | |
|
4958 | </member> | |
|
4959 | <member name="M:NUnit.Framework.StringAssert.EndsWith(System.String,System.String,System.String)"> | |
|
4960 | <summary> | |
|
4961 | Asserts that a string ends with another string. | |
|
4962 | </summary> | |
|
4963 | <param name="expected">The expected string</param> | |
|
4964 | <param name="actual">The string to be examined</param> | |
|
4965 | <param name="message">The message to display in case of failure</param> | |
|
4966 | </member> | |
|
4967 | <member name="M:NUnit.Framework.StringAssert.EndsWith(System.String,System.String)"> | |
|
4968 | <summary> | |
|
4969 | Asserts that a string ends with another string. | |
|
4970 | </summary> | |
|
4971 | <param name="expected">The expected string</param> | |
|
4972 | <param name="actual">The string to be examined</param> | |
|
4973 | </member> | |
|
4974 | <member name="M:NUnit.Framework.StringAssert.DoesNotEndWith(System.String,System.String,System.String,System.Object[])"> | |
|
4975 | <summary> | |
|
4976 | Asserts that a string does not end with another string. | |
|
4977 | </summary> | |
|
4978 | <param name="expected">The expected string</param> | |
|
4979 | <param name="actual">The string to be examined</param> | |
|
4980 | <param name="message">The message to display in case of failure</param> | |
|
4981 | <param name="args">Arguments used in formatting the message</param> | |
|
4982 | </member> | |
|
4983 | <member name="M:NUnit.Framework.StringAssert.DoesNotEndWith(System.String,System.String,System.String)"> | |
|
4984 | <summary> | |
|
4985 | Asserts that a string does not end with another string. | |
|
4986 | </summary> | |
|
4987 | <param name="expected">The expected string</param> | |
|
4988 | <param name="actual">The string to be examined</param> | |
|
4989 | <param name="message">The message to display in case of failure</param> | |
|
4990 | </member> | |
|
4991 | <member name="M:NUnit.Framework.StringAssert.DoesNotEndWith(System.String,System.String)"> | |
|
4992 | <summary> | |
|
4993 | Asserts that a string does not end with another string. | |
|
4994 | </summary> | |
|
4995 | <param name="expected">The expected string</param> | |
|
4996 | <param name="actual">The string to be examined</param> | |
|
4997 | </member> | |
|
4998 | <member name="M:NUnit.Framework.StringAssert.AreEqualIgnoringCase(System.String,System.String,System.String,System.Object[])"> | |
|
4999 | <summary> | |
|
5000 | Asserts that two strings are equal, without regard to case. | |
|
5001 | </summary> | |
|
5002 | <param name="expected">The expected string</param> | |
|
5003 | <param name="actual">The actual string</param> | |
|
5004 | <param name="message">The message to display in case of failure</param> | |
|
5005 | <param name="args">Arguments used in formatting the message</param> | |
|
5006 | </member> | |
|
5007 | <member name="M:NUnit.Framework.StringAssert.AreEqualIgnoringCase(System.String,System.String,System.String)"> | |
|
5008 | <summary> | |
|
5009 | Asserts that two strings are equal, without regard to case. | |
|
5010 | </summary> | |
|
5011 | <param name="expected">The expected string</param> | |
|
5012 | <param name="actual">The actual string</param> | |
|
5013 | <param name="message">The message to display in case of failure</param> | |
|
5014 | </member> | |
|
5015 | <member name="M:NUnit.Framework.StringAssert.AreEqualIgnoringCase(System.String,System.String)"> | |
|
5016 | <summary> | |
|
5017 | Asserts that two strings are equal, without regard to case. | |
|
5018 | </summary> | |
|
5019 | <param name="expected">The expected string</param> | |
|
5020 | <param name="actual">The actual string</param> | |
|
5021 | </member> | |
|
5022 | <member name="M:NUnit.Framework.StringAssert.AreNotEqualIgnoringCase(System.String,System.String,System.String,System.Object[])"> | |
|
5023 | <summary> | |
|
5024 | Asserts that two strings are not equal, without regard to case. | |
|
5025 | </summary> | |
|
5026 | <param name="expected">The expected string</param> | |
|
5027 | <param name="actual">The actual string</param> | |
|
5028 | <param name="message">The message to display in case of failure</param> | |
|
5029 | <param name="args">Arguments used in formatting the message</param> | |
|
5030 | </member> | |
|
5031 | <member name="M:NUnit.Framework.StringAssert.AreNotEqualIgnoringCase(System.String,System.String,System.String)"> | |
|
5032 | <summary> | |
|
5033 | Asserts that two strings are Notequal, without regard to case. | |
|
5034 | </summary> | |
|
5035 | <param name="expected">The expected string</param> | |
|
5036 | <param name="actual">The actual string</param> | |
|
5037 | <param name="message">The message to display in case of failure</param> | |
|
5038 | </member> | |
|
5039 | <member name="M:NUnit.Framework.StringAssert.AreNotEqualIgnoringCase(System.String,System.String)"> | |
|
5040 | <summary> | |
|
5041 | Asserts that two strings are not equal, without regard to case. | |
|
5042 | </summary> | |
|
5043 | <param name="expected">The expected string</param> | |
|
5044 | <param name="actual">The actual string</param> | |
|
5045 | </member> | |
|
5046 | <member name="M:NUnit.Framework.StringAssert.IsMatch(System.String,System.String,System.String,System.Object[])"> | |
|
5047 | <summary> | |
|
5048 | Asserts that a string matches an expected regular expression pattern. | |
|
5049 | </summary> | |
|
5050 | <param name="pattern">The regex pattern to be matched</param> | |
|
5051 | <param name="actual">The actual string</param> | |
|
5052 | <param name="message">The message to display in case of failure</param> | |
|
5053 | <param name="args">Arguments used in formatting the message</param> | |
|
5054 | </member> | |
|
5055 | <member name="M:NUnit.Framework.StringAssert.IsMatch(System.String,System.String,System.String)"> | |
|
5056 | <summary> | |
|
5057 | Asserts that a string matches an expected regular expression pattern. | |
|
5058 | </summary> | |
|
5059 | <param name="pattern">The regex pattern to be matched</param> | |
|
5060 | <param name="actual">The actual string</param> | |
|
5061 | <param name="message">The message to display in case of failure</param> | |
|
5062 | </member> | |
|
5063 | <member name="M:NUnit.Framework.StringAssert.IsMatch(System.String,System.String)"> | |
|
5064 | <summary> | |
|
5065 | Asserts that a string matches an expected regular expression pattern. | |
|
5066 | </summary> | |
|
5067 | <param name="pattern">The regex pattern to be matched</param> | |
|
5068 | <param name="actual">The actual string</param> | |
|
5069 | </member> | |
|
5070 | <member name="M:NUnit.Framework.StringAssert.DoesNotMatch(System.String,System.String,System.String,System.Object[])"> | |
|
5071 | <summary> | |
|
5072 | Asserts that a string does not match an expected regular expression pattern. | |
|
5073 | </summary> | |
|
5074 | <param name="pattern">The regex pattern to be used</param> | |
|
5075 | <param name="actual">The actual string</param> | |
|
5076 | <param name="message">The message to display in case of failure</param> | |
|
5077 | <param name="args">Arguments used in formatting the message</param> | |
|
5078 | </member> | |
|
5079 | <member name="M:NUnit.Framework.StringAssert.DoesNotMatch(System.String,System.String,System.String)"> | |
|
5080 | <summary> | |
|
5081 | Asserts that a string does not match an expected regular expression pattern. | |
|
5082 | </summary> | |
|
5083 | <param name="pattern">The regex pattern to be used</param> | |
|
5084 | <param name="actual">The actual string</param> | |
|
5085 | <param name="message">The message to display in case of failure</param> | |
|
5086 | </member> | |
|
5087 | <member name="M:NUnit.Framework.StringAssert.DoesNotMatch(System.String,System.String)"> | |
|
5088 | <summary> | |
|
5089 | Asserts that a string does not match an expected regular expression pattern. | |
|
5090 | </summary> | |
|
5091 | <param name="pattern">The regex pattern to be used</param> | |
|
5092 | <param name="actual">The actual string</param> | |
|
5093 | </member> | |
|
5094 | <member name="T:NUnit.Framework.TestCaseData"> | |
|
5095 | <summary> | |
|
5096 | The TestCaseData class represents a set of arguments | |
|
5097 | and other parameter info to be used for a parameterized | |
|
5098 | test case. It provides a number of instance modifiers | |
|
5099 | for use in initializing the test case. | |
|
5100 | ||
|
5101 | Note: Instance modifiers are getters that return | |
|
5102 | the same instance after modifying it's state. | |
|
5103 | </summary> | |
|
5104 | </member> | |
|
5105 | <member name="F:NUnit.Framework.TestCaseData.arguments"> | |
|
5106 | <summary> | |
|
5107 | The argument list to be provided to the test | |
|
5108 | </summary> | |
|
5109 | </member> | |
|
5110 | <member name="F:NUnit.Framework.TestCaseData.expectedResult"> | |
|
5111 | <summary> | |
|
5112 | The expected result to be returned | |
|
5113 | </summary> | |
|
5114 | </member> | |
|
5115 | <member name="F:NUnit.Framework.TestCaseData.hasExpectedResult"> | |
|
5116 | <summary> | |
|
5117 | Set to true if this has an expected result | |
|
5118 | </summary> | |
|
5119 | </member> | |
|
5120 | <member name="F:NUnit.Framework.TestCaseData.expectedExceptionType"> | |
|
5121 | <summary> | |
|
5122 | The expected exception Type | |
|
5123 | </summary> | |
|
5124 | </member> | |
|
5125 | <member name="F:NUnit.Framework.TestCaseData.expectedExceptionName"> | |
|
5126 | <summary> | |
|
5127 | The FullName of the expected exception | |
|
5128 | </summary> | |
|
5129 | </member> | |
|
5130 | <member name="F:NUnit.Framework.TestCaseData.testName"> | |
|
5131 | <summary> | |
|
5132 | The name to be used for the test | |
|
5133 | </summary> | |
|
5134 | </member> | |
|
5135 | <member name="F:NUnit.Framework.TestCaseData.description"> | |
|
5136 | <summary> | |
|
5137 | The description of the test | |
|
5138 | </summary> | |
|
5139 | </member> | |
|
5140 | <member name="F:NUnit.Framework.TestCaseData.properties"> | |
|
5141 | <summary> | |
|
5142 | A dictionary of properties, used to add information | |
|
5143 | to tests without requiring the class to change. | |
|
5144 | </summary> | |
|
5145 | </member> | |
|
5146 | <member name="F:NUnit.Framework.TestCaseData.isIgnored"> | |
|
5147 | <summary> | |
|
5148 | If true, indicates that the test case is to be ignored | |
|
5149 | </summary> | |
|
5150 | </member> | |
|
5151 | <member name="F:NUnit.Framework.TestCaseData.isExplicit"> | |
|
5152 | <summary> | |
|
5153 | If true, indicates that the test case is marked explicit | |
|
5154 | </summary> | |
|
5155 | </member> | |
|
5156 | <member name="F:NUnit.Framework.TestCaseData.ignoreReason"> | |
|
5157 | <summary> | |
|
5158 | The reason for ignoring a test case | |
|
5159 | </summary> | |
|
5160 | </member> | |
|
5161 | <member name="M:NUnit.Framework.TestCaseData.#ctor(System.Object[])"> | |
|
5162 | <summary> | |
|
5163 | Initializes a new instance of the <see cref="T:TestCaseData"/> class. | |
|
5164 | </summary> | |
|
5165 | <param name="args">The arguments.</param> | |
|
5166 | </member> | |
|
5167 | <member name="M:NUnit.Framework.TestCaseData.#ctor(System.Object)"> | |
|
5168 | <summary> | |
|
5169 | Initializes a new instance of the <see cref="T:TestCaseData"/> class. | |
|
5170 | </summary> | |
|
5171 | <param name="arg">The argument.</param> | |
|
5172 | </member> | |
|
5173 | <member name="M:NUnit.Framework.TestCaseData.#ctor(System.Object,System.Object)"> | |
|
5174 | <summary> | |
|
5175 | Initializes a new instance of the <see cref="T:TestCaseData"/> class. | |
|
5176 | </summary> | |
|
5177 | <param name="arg1">The first argument.</param> | |
|
5178 | <param name="arg2">The second argument.</param> | |
|
5179 | </member> | |
|
5180 | <member name="M:NUnit.Framework.TestCaseData.#ctor(System.Object,System.Object,System.Object)"> | |
|
5181 | <summary> | |
|
5182 | Initializes a new instance of the <see cref="T:TestCaseData"/> class. | |
|
5183 | </summary> | |
|
5184 | <param name="arg1">The first argument.</param> | |
|
5185 | <param name="arg2">The second argument.</param> | |
|
5186 | <param name="arg3">The third argument.</param> | |
|
5187 | </member> | |
|
5188 | <member name="M:NUnit.Framework.TestCaseData.Returns(System.Object)"> | |
|
5189 | <summary> | |
|
5190 | Sets the expected result for the test | |
|
5191 | </summary> | |
|
5192 | <param name="result">The expected result</param> | |
|
5193 | <returns>A modified TestCaseData</returns> | |
|
5194 | </member> | |
|
5195 | <member name="M:NUnit.Framework.TestCaseData.Throws(System.Type)"> | |
|
5196 | <summary> | |
|
5197 | Sets the expected exception type for the test | |
|
5198 | </summary> | |
|
5199 | <param name="exceptionType">Type of the expected exception.</param> | |
|
5200 | <returns>The modified TestCaseData instance</returns> | |
|
5201 | </member> | |
|
5202 | <member name="M:NUnit.Framework.TestCaseData.Throws(System.String)"> | |
|
5203 | <summary> | |
|
5204 | Sets the expected exception type for the test | |
|
5205 | </summary> | |
|
5206 | <param name="exceptionName">FullName of the expected exception.</param> | |
|
5207 | <returns>The modified TestCaseData instance</returns> | |
|
5208 | </member> | |
|
5209 | <member name="M:NUnit.Framework.TestCaseData.SetName(System.String)"> | |
|
5210 | <summary> | |
|
5211 | Sets the name of the test case | |
|
5212 | </summary> | |
|
5213 | <returns>The modified TestCaseData instance</returns> | |
|
5214 | </member> | |
|
5215 | <member name="M:NUnit.Framework.TestCaseData.SetDescription(System.String)"> | |
|
5216 | <summary> | |
|
5217 | Sets the description for the test case | |
|
5218 | being constructed. | |
|
5219 | </summary> | |
|
5220 | <param name="description">The description.</param> | |
|
5221 | <returns>The modified TestCaseData instance.</returns> | |
|
5222 | </member> | |
|
5223 | <member name="M:NUnit.Framework.TestCaseData.SetCategory(System.String)"> | |
|
5224 | <summary> | |
|
5225 | Applies a category to the test | |
|
5226 | </summary> | |
|
5227 | <param name="category"></param> | |
|
5228 | <returns></returns> | |
|
5229 | </member> | |
|
5230 | <member name="M:NUnit.Framework.TestCaseData.SetProperty(System.String,System.String)"> | |
|
5231 | <summary> | |
|
5232 | Applies a named property to the test | |
|
5233 | </summary> | |
|
5234 | <param name="propName"></param> | |
|
5235 | <param name="propValue"></param> | |
|
5236 | <returns></returns> | |
|
5237 | </member> | |
|
5238 | <member name="M:NUnit.Framework.TestCaseData.SetProperty(System.String,System.Int32)"> | |
|
5239 | <summary> | |
|
5240 | Applies a named property to the test | |
|
5241 | </summary> | |
|
5242 | <param name="propName"></param> | |
|
5243 | <param name="propValue"></param> | |
|
5244 | <returns></returns> | |
|
5245 | </member> | |
|
5246 | <member name="M:NUnit.Framework.TestCaseData.SetProperty(System.String,System.Double)"> | |
|
5247 | <summary> | |
|
5248 | Applies a named property to the test | |
|
5249 | </summary> | |
|
5250 | <param name="propName"></param> | |
|
5251 | <param name="propValue"></param> | |
|
5252 | <returns></returns> | |
|
5253 | </member> | |
|
5254 | <member name="M:NUnit.Framework.TestCaseData.Ignore"> | |
|
5255 | <summary> | |
|
5256 | Ignores this TestCase. | |
|
5257 | </summary> | |
|
5258 | <returns></returns> | |
|
5259 | </member> | |
|
5260 | <member name="M:NUnit.Framework.TestCaseData.Ignore(System.String)"> | |
|
5261 | <summary> | |
|
5262 | Ignores this TestCase, specifying the reason. | |
|
5263 | </summary> | |
|
5264 | <param name="reason">The reason.</param> | |
|
5265 | <returns></returns> | |
|
5266 | </member> | |
|
5267 | <member name="M:NUnit.Framework.TestCaseData.MakeExplicit"> | |
|
5268 | <summary> | |
|
5269 | Marks this TestCase as Explicit | |
|
5270 | </summary> | |
|
5271 | <returns></returns> | |
|
5272 | </member> | |
|
5273 | <member name="M:NUnit.Framework.TestCaseData.MakeExplicit(System.String)"> | |
|
5274 | <summary> | |
|
5275 | Marks this TestCase as Explicit, specifying the reason. | |
|
5276 | </summary> | |
|
5277 | <param name="reason">The reason.</param> | |
|
5278 | <returns></returns> | |
|
5279 | </member> | |
|
5280 | <member name="P:NUnit.Framework.TestCaseData.Arguments"> | |
|
5281 | <summary> | |
|
5282 | Gets the argument list to be provided to the test | |
|
5283 | </summary> | |
|
5284 | </member> | |
|
5285 | <member name="P:NUnit.Framework.TestCaseData.Result"> | |
|
5286 | <summary> | |
|
5287 | Gets the expected result | |
|
5288 | </summary> | |
|
5289 | </member> | |
|
5290 | <member name="P:NUnit.Framework.TestCaseData.HasExpectedResult"> | |
|
5291 | <summary> | |
|
5292 | Returns true if the result has been set | |
|
5293 | </summary> | |
|
5294 | </member> | |
|
5295 | <member name="P:NUnit.Framework.TestCaseData.ExpectedException"> | |
|
5296 | <summary> | |
|
5297 | Gets the expected exception Type | |
|
5298 | </summary> | |
|
5299 | </member> | |
|
5300 | <member name="P:NUnit.Framework.TestCaseData.ExpectedExceptionName"> | |
|
5301 | <summary> | |
|
5302 | Gets the FullName of the expected exception | |
|
5303 | </summary> | |
|
5304 | </member> | |
|
5305 | <member name="P:NUnit.Framework.TestCaseData.TestName"> | |
|
5306 | <summary> | |
|
5307 | Gets the name to be used for the test | |
|
5308 | </summary> | |
|
5309 | </member> | |
|
5310 | <member name="P:NUnit.Framework.TestCaseData.Description"> | |
|
5311 | <summary> | |
|
5312 | Gets the description of the test | |
|
5313 | </summary> | |
|
5314 | </member> | |
|
5315 | <member name="P:NUnit.Framework.TestCaseData.Ignored"> | |
|
5316 | <summary> | |
|
5317 | Gets a value indicating whether this <see cref="T:NUnit.Framework.ITestCaseData"/> is ignored. | |
|
5318 | </summary> | |
|
5319 | <value><c>true</c> if ignored; otherwise, <c>false</c>.</value> | |
|
5320 | </member> | |
|
5321 | <member name="P:NUnit.Framework.TestCaseData.Explicit"> | |
|
5322 | <summary> | |
|
5323 | Gets a value indicating whether this <see cref="T:NUnit.Framework.ITestCaseData"/> is explicit. | |
|
5324 | </summary> | |
|
5325 | <value><c>true</c> if explicit; otherwise, <c>false</c>.</value> | |
|
5326 | </member> | |
|
5327 | <member name="P:NUnit.Framework.TestCaseData.IgnoreReason"> | |
|
5328 | <summary> | |
|
5329 | Gets the ignore reason. | |
|
5330 | </summary> | |
|
5331 | <value>The ignore reason.</value> | |
|
5332 | </member> | |
|
5333 | <member name="P:NUnit.Framework.TestCaseData.Categories"> | |
|
5334 | <summary> | |
|
5335 | Gets a list of categories associated with this test. | |
|
5336 | </summary> | |
|
5337 | </member> | |
|
5338 | <member name="P:NUnit.Framework.TestCaseData.Properties"> | |
|
5339 | <summary> | |
|
5340 | Gets the property dictionary for this test | |
|
5341 | </summary> | |
|
5342 | </member> | |
|
5343 | <member name="T:NUnit.Framework.TestContext"> | |
|
5344 | <summary> | |
|
5345 | Provide the context information of the current test | |
|
5346 | </summary> | |
|
5347 | </member> | |
|
5348 | <member name="M:NUnit.Framework.TestContext.#ctor(System.Collections.IDictionary)"> | |
|
5349 | <summary> | |
|
5350 | Constructs a TestContext using the provided context dictionary | |
|
5351 | </summary> | |
|
5352 | <param name="context">A context dictionary</param> | |
|
5353 | </member> | |
|
5354 | <member name="P:NUnit.Framework.TestContext.CurrentContext"> | |
|
5355 | <summary> | |
|
5356 | Get the current test context. This is created | |
|
5357 | as needed. The user may save the context for | |
|
5358 | use within a test, but it should not be used | |
|
5359 | outside the test for which it is created. | |
|
5360 | </summary> | |
|
5361 | </member> | |
|
5362 | <member name="P:NUnit.Framework.TestContext.Test"> | |
|
5363 | <summary> | |
|
5364 | Gets a TestAdapter representing the currently executing test in this context. | |
|
5365 | </summary> | |
|
5366 | </member> | |
|
5367 | <member name="P:NUnit.Framework.TestContext.Result"> | |
|
5368 | <summary> | |
|
5369 | Gets a ResultAdapter representing the current result for the test | |
|
5370 | executing in this context. | |
|
5371 | </summary> | |
|
5372 | </member> | |
|
5373 | <member name="P:NUnit.Framework.TestContext.TestDirectory"> | |
|
5374 | <summary> | |
|
5375 | Gets the directory containing the current test assembly. | |
|
5376 | </summary> | |
|
5377 | </member> | |
|
5378 | <member name="P:NUnit.Framework.TestContext.WorkDirectory"> | |
|
5379 | <summary> | |
|
5380 | Gets the directory to be used for outputing files created | |
|
5381 | by this test run. | |
|
5382 | </summary> | |
|
5383 | </member> | |
|
5384 | <member name="T:NUnit.Framework.TestContext.TestAdapter"> | |
|
5385 | <summary> | |
|
5386 | TestAdapter adapts a Test for consumption by | |
|
5387 | the user test code. | |
|
5388 | </summary> | |
|
5389 | </member> | |
|
5390 | <member name="M:NUnit.Framework.TestContext.TestAdapter.#ctor(System.Collections.IDictionary)"> | |
|
5391 | <summary> | |
|
5392 | Constructs a TestAdapter for this context | |
|
5393 | </summary> | |
|
5394 | <param name="context">The context dictionary</param> | |
|
5395 | </member> | |
|
5396 | <member name="P:NUnit.Framework.TestContext.TestAdapter.Name"> | |
|
5397 | <summary> | |
|
5398 | The name of the test. | |
|
5399 | </summary> | |
|
5400 | </member> | |
|
5401 | <member name="P:NUnit.Framework.TestContext.TestAdapter.FullName"> | |
|
5402 | <summary> | |
|
5403 | The FullName of the test | |
|
5404 | </summary> | |
|
5405 | </member> | |
|
5406 | <member name="P:NUnit.Framework.TestContext.TestAdapter.Properties"> | |
|
5407 | <summary> | |
|
5408 | The properties of the test. | |
|
5409 | </summary> | |
|
5410 | </member> | |
|
5411 | <member name="T:NUnit.Framework.TestContext.ResultAdapter"> | |
|
5412 | <summary> | |
|
5413 | ResultAdapter adapts a TestResult for consumption by | |
|
5414 | the user test code. | |
|
5415 | </summary> | |
|
5416 | </member> | |
|
5417 | <member name="M:NUnit.Framework.TestContext.ResultAdapter.#ctor(System.Collections.IDictionary)"> | |
|
5418 | <summary> | |
|
5419 | Construct a ResultAdapter for a context | |
|
5420 | </summary> | |
|
5421 | <param name="context">The context holding the result</param> | |
|
5422 | </member> | |
|
5423 | <member name="P:NUnit.Framework.TestContext.ResultAdapter.State"> | |
|
5424 | <summary> | |
|
5425 | The TestState of current test. This maps to the ResultState | |
|
5426 | used in nunit.core and is subject to change in the future. | |
|
5427 | </summary> | |
|
5428 | </member> | |
|
5429 | <member name="P:NUnit.Framework.TestContext.ResultAdapter.Status"> | |
|
5430 | <summary> | |
|
5431 | The TestStatus of current test. This enum will be used | |
|
5432 | in future versions of NUnit and so is to be preferred | |
|
5433 | to the TestState value. | |
|
5434 | </summary> | |
|
5435 | </member> | |
|
5436 | <member name="T:NUnit.Framework.TestDetails"> | |
|
5437 | <summary> | |
|
5438 | Provides details about a test | |
|
5439 | </summary> | |
|
5440 | </member> | |
|
5441 | <member name="M:NUnit.Framework.TestDetails.#ctor(System.Object,System.Reflection.MethodInfo,System.String,System.String,System.Boolean)"> | |
|
5442 | <summary> | |
|
5443 | Creates an instance of TestDetails | |
|
5444 | </summary> | |
|
5445 | <param name="fixture">The fixture that the test is a member of, if available.</param> | |
|
5446 | <param name="method">The method that implements the test, if available.</param> | |
|
5447 | <param name="fullName">The full name of the test.</param> | |
|
5448 | <param name="type">A string representing the type of test, e.g. "Test Case".</param> | |
|
5449 | <param name="isSuite">Indicates if the test represents a suite of tests.</param> | |
|
5450 | </member> | |
|
5451 | <member name="P:NUnit.Framework.TestDetails.Fixture"> | |
|
5452 | <summary> | |
|
5453 | The fixture that the test is a member of, if available. | |
|
5454 | </summary> | |
|
5455 | </member> | |
|
5456 | <member name="P:NUnit.Framework.TestDetails.Method"> | |
|
5457 | <summary> | |
|
5458 | The method that implements the test, if available. | |
|
5459 | </summary> | |
|
5460 | </member> | |
|
5461 | <member name="P:NUnit.Framework.TestDetails.FullName"> | |
|
5462 | <summary> | |
|
5463 | The full name of the test. | |
|
5464 | </summary> | |
|
5465 | </member> | |
|
5466 | <member name="P:NUnit.Framework.TestDetails.Type"> | |
|
5467 | <summary> | |
|
5468 | A string representing the type of test, e.g. "Test Case". | |
|
5469 | </summary> | |
|
5470 | </member> | |
|
5471 | <member name="P:NUnit.Framework.TestDetails.IsSuite"> | |
|
5472 | <summary> | |
|
5473 | Indicates if the test represents a suite of tests. | |
|
5474 | </summary> | |
|
5475 | </member> | |
|
5476 | <member name="T:NUnit.Framework.TestState"> | |
|
5477 | <summary> | |
|
5478 | The ResultState enum indicates the result of running a test | |
|
5479 | </summary> | |
|
5480 | </member> | |
|
5481 | <member name="F:NUnit.Framework.TestState.Inconclusive"> | |
|
5482 | <summary> | |
|
5483 | The result is inconclusive | |
|
5484 | </summary> | |
|
5485 | </member> | |
|
5486 | <member name="F:NUnit.Framework.TestState.NotRunnable"> | |
|
5487 | <summary> | |
|
5488 | The test was not runnable. | |
|
5489 | </summary> | |
|
5490 | </member> | |
|
5491 | <member name="F:NUnit.Framework.TestState.Skipped"> | |
|
5492 | <summary> | |
|
5493 | The test has been skipped. | |
|
5494 | </summary> | |
|
5495 | </member> | |
|
5496 | <member name="F:NUnit.Framework.TestState.Ignored"> | |
|
5497 | <summary> | |
|
5498 | The test has been ignored. | |
|
5499 | </summary> | |
|
5500 | </member> | |
|
5501 | <member name="F:NUnit.Framework.TestState.Success"> | |
|
5502 | <summary> | |
|
5503 | The test succeeded | |
|
5504 | </summary> | |
|
5505 | </member> | |
|
5506 | <member name="F:NUnit.Framework.TestState.Failure"> | |
|
5507 | <summary> | |
|
5508 | The test failed | |
|
5509 | </summary> | |
|
5510 | </member> | |
|
5511 | <member name="F:NUnit.Framework.TestState.Error"> | |
|
5512 | <summary> | |
|
5513 | The test encountered an unexpected exception | |
|
5514 | </summary> | |
|
5515 | </member> | |
|
5516 | <member name="F:NUnit.Framework.TestState.Cancelled"> | |
|
5517 | <summary> | |
|
5518 | The test was cancelled by the user | |
|
5519 | </summary> | |
|
5520 | </member> | |
|
5521 | <member name="T:NUnit.Framework.TestStatus"> | |
|
5522 | <summary> | |
|
5523 | The TestStatus enum indicates the result of running a test | |
|
5524 | </summary> | |
|
5525 | </member> | |
|
5526 | <member name="F:NUnit.Framework.TestStatus.Inconclusive"> | |
|
5527 | <summary> | |
|
5528 | The test was inconclusive | |
|
5529 | </summary> | |
|
5530 | </member> | |
|
5531 | <member name="F:NUnit.Framework.TestStatus.Skipped"> | |
|
5532 | <summary> | |
|
5533 | The test has skipped | |
|
5534 | </summary> | |
|
5535 | </member> | |
|
5536 | <member name="F:NUnit.Framework.TestStatus.Passed"> | |
|
5537 | <summary> | |
|
5538 | The test succeeded | |
|
5539 | </summary> | |
|
5540 | </member> | |
|
5541 | <member name="F:NUnit.Framework.TestStatus.Failed"> | |
|
5542 | <summary> | |
|
5543 | The test failed | |
|
5544 | </summary> | |
|
5545 | </member> | |
|
5546 | <member name="T:NUnit.Framework.Text"> | |
|
5547 | <summary> | |
|
5548 | Helper class with static methods used to supply constraints | |
|
5549 | that operate on strings. | |
|
5550 | </summary> | |
|
5551 | </member> | |
|
5552 | <member name="M:NUnit.Framework.Text.Contains(System.String)"> | |
|
5553 | <summary> | |
|
5554 | Returns a constraint that succeeds if the actual | |
|
5555 | value contains the substring supplied as an argument. | |
|
5556 | </summary> | |
|
5557 | </member> | |
|
5558 | <member name="M:NUnit.Framework.Text.DoesNotContain(System.String)"> | |
|
5559 | <summary> | |
|
5560 | Returns a constraint that fails if the actual | |
|
5561 | value contains the substring supplied as an argument. | |
|
5562 | </summary> | |
|
5563 | </member> | |
|
5564 | <member name="M:NUnit.Framework.Text.StartsWith(System.String)"> | |
|
5565 | <summary> | |
|
5566 | Returns a constraint that succeeds if the actual | |
|
5567 | value starts with the substring supplied as an argument. | |
|
5568 | </summary> | |
|
5569 | </member> | |
|
5570 | <member name="M:NUnit.Framework.Text.DoesNotStartWith(System.String)"> | |
|
5571 | <summary> | |
|
5572 | Returns a constraint that fails if the actual | |
|
5573 | value starts with the substring supplied as an argument. | |
|
5574 | </summary> | |
|
5575 | </member> | |
|
5576 | <member name="M:NUnit.Framework.Text.EndsWith(System.String)"> | |
|
5577 | <summary> | |
|
5578 | Returns a constraint that succeeds if the actual | |
|
5579 | value ends with the substring supplied as an argument. | |
|
5580 | </summary> | |
|
5581 | </member> | |
|
5582 | <member name="M:NUnit.Framework.Text.DoesNotEndWith(System.String)"> | |
|
5583 | <summary> | |
|
5584 | Returns a constraint that fails if the actual | |
|
5585 | value ends with the substring supplied as an argument. | |
|
5586 | </summary> | |
|
5587 | </member> | |
|
5588 | <member name="M:NUnit.Framework.Text.Matches(System.String)"> | |
|
5589 | <summary> | |
|
5590 | Returns a constraint that succeeds if the actual | |
|
5591 | value matches the Regex pattern supplied as an argument. | |
|
5592 | </summary> | |
|
5593 | </member> | |
|
5594 | <member name="M:NUnit.Framework.Text.DoesNotMatch(System.String)"> | |
|
5595 | <summary> | |
|
5596 | Returns a constraint that fails if the actual | |
|
5597 | value matches the pattern supplied as an argument. | |
|
5598 | </summary> | |
|
5599 | </member> | |
|
5600 | <member name="P:NUnit.Framework.Text.All"> | |
|
5601 | <summary> | |
|
5602 | Returns a ConstraintExpression, which will apply | |
|
5603 | the following constraint to all members of a collection, | |
|
5604 | succeeding if all of them succeed. | |
|
5605 | </summary> | |
|
5606 | </member> | |
|
5607 | <member name="T:NUnit.Framework.TextMessageWriter"> | |
|
5608 | <summary> | |
|
5609 | TextMessageWriter writes constraint descriptions and messages | |
|
5610 | in displayable form as a text stream. It tailors the display | |
|
5611 | of individual message components to form the standard message | |
|
5612 | format of NUnit assertion failure messages. | |
|
5613 | </summary> | |
|
5614 | </member> | |
|
5615 | <member name="T:NUnit.Framework.Constraints.MessageWriter"> | |
|
5616 | <summary> | |
|
5617 | MessageWriter is the abstract base for classes that write | |
|
5618 | constraint descriptions and messages in some form. The | |
|
5619 | class has separate methods for writing various components | |
|
5620 | of a message, allowing implementations to tailor the | |
|
5621 | presentation as needed. | |
|
5622 | </summary> | |
|
5623 | </member> | |
|
5624 | <member name="M:NUnit.Framework.Constraints.MessageWriter.#ctor"> | |
|
5625 | <summary> | |
|
5626 | Construct a MessageWriter given a culture | |
|
5627 | </summary> | |
|
5628 | </member> | |
|
5629 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteMessageLine(System.String,System.Object[])"> | |
|
5630 | <summary> | |
|
5631 | Method to write single line message with optional args, usually | |
|
5632 | written to precede the general failure message. | |
|
5633 | </summary> | |
|
5634 | <param name="message">The message to be written</param> | |
|
5635 | <param name="args">Any arguments used in formatting the message</param> | |
|
5636 | </member> | |
|
5637 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteMessageLine(System.Int32,System.String,System.Object[])"> | |
|
5638 | <summary> | |
|
5639 | Method to write single line message with optional args, usually | |
|
5640 | written to precede the general failure message, at a givel | |
|
5641 | indentation level. | |
|
5642 | </summary> | |
|
5643 | <param name="level">The indentation level of the message</param> | |
|
5644 | <param name="message">The message to be written</param> | |
|
5645 | <param name="args">Any arguments used in formatting the message</param> | |
|
5646 | </member> | |
|
5647 | <member name="M:NUnit.Framework.Constraints.MessageWriter.DisplayDifferences(NUnit.Framework.Constraints.Constraint)"> | |
|
5648 | <summary> | |
|
5649 | Display Expected and Actual lines for a constraint. This | |
|
5650 | is called by MessageWriter's default implementation of | |
|
5651 | WriteMessageTo and provides the generic two-line display. | |
|
5652 | </summary> | |
|
5653 | <param name="constraint">The constraint that failed</param> | |
|
5654 | </member> | |
|
5655 | <member name="M:NUnit.Framework.Constraints.MessageWriter.DisplayDifferences(System.Object,System.Object)"> | |
|
5656 | <summary> | |
|
5657 | Display Expected and Actual lines for given values. This | |
|
5658 | method may be called by constraints that need more control over | |
|
5659 | the display of actual and expected values than is provided | |
|
5660 | by the default implementation. | |
|
5661 | </summary> | |
|
5662 | <param name="expected">The expected value</param> | |
|
5663 | <param name="actual">The actual value causing the failure</param> | |
|
5664 | </member> | |
|
5665 | <member name="M:NUnit.Framework.Constraints.MessageWriter.DisplayDifferences(System.Object,System.Object,NUnit.Framework.Constraints.Tolerance)"> | |
|
5666 | <summary> | |
|
5667 | Display Expected and Actual lines for given values, including | |
|
5668 | a tolerance value on the Expected line. | |
|
5669 | </summary> | |
|
5670 | <param name="expected">The expected value</param> | |
|
5671 | <param name="actual">The actual value causing the failure</param> | |
|
5672 | <param name="tolerance">The tolerance within which the test was made</param> | |
|
5673 | </member> | |
|
5674 | <member name="M:NUnit.Framework.Constraints.MessageWriter.DisplayStringDifferences(System.String,System.String,System.Int32,System.Boolean,System.Boolean)"> | |
|
5675 | <summary> | |
|
5676 | Display the expected and actual string values on separate lines. | |
|
5677 | If the mismatch parameter is >=0, an additional line is displayed | |
|
5678 | line containing a caret that points to the mismatch point. | |
|
5679 | </summary> | |
|
5680 | <param name="expected">The expected string value</param> | |
|
5681 | <param name="actual">The actual string value</param> | |
|
5682 | <param name="mismatch">The point at which the strings don't match or -1</param> | |
|
5683 | <param name="ignoreCase">If true, case is ignored in locating the point where the strings differ</param> | |
|
5684 | <param name="clipping">If true, the strings should be clipped to fit the line</param> | |
|
5685 | </member> | |
|
5686 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteConnector(System.String)"> | |
|
5687 | <summary> | |
|
5688 | Writes the text for a connector. | |
|
5689 | </summary> | |
|
5690 | <param name="connector">The connector.</param> | |
|
5691 | </member> | |
|
5692 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WritePredicate(System.String)"> | |
|
5693 | <summary> | |
|
5694 | Writes the text for a predicate. | |
|
5695 | </summary> | |
|
5696 | <param name="predicate">The predicate.</param> | |
|
5697 | </member> | |
|
5698 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteExpectedValue(System.Object)"> | |
|
5699 | <summary> | |
|
5700 | Writes the text for an expected value. | |
|
5701 | </summary> | |
|
5702 | <param name="expected">The expected value.</param> | |
|
5703 | </member> | |
|
5704 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteModifier(System.String)"> | |
|
5705 | <summary> | |
|
5706 | Writes the text for a modifier | |
|
5707 | </summary> | |
|
5708 | <param name="modifier">The modifier.</param> | |
|
5709 | </member> | |
|
5710 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteActualValue(System.Object)"> | |
|
5711 | <summary> | |
|
5712 | Writes the text for an actual value. | |
|
5713 | </summary> | |
|
5714 | <param name="actual">The actual value.</param> | |
|
5715 | </member> | |
|
5716 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteValue(System.Object)"> | |
|
5717 | <summary> | |
|
5718 | Writes the text for a generalized value. | |
|
5719 | </summary> | |
|
5720 | <param name="val">The value.</param> | |
|
5721 | </member> | |
|
5722 | <member name="M:NUnit.Framework.Constraints.MessageWriter.WriteCollectionElements(System.Collections.IEnumerable,System.Int32,System.Int32)"> | |
|
5723 | <summary> | |
|
5724 | Writes the text for a collection value, | |
|
5725 | starting at a particular point, to a max length | |
|
5726 | </summary> | |
|
5727 | <param name="collection">The collection containing elements to write.</param> | |
|
5728 | <param name="start">The starting point of the elements to write</param> | |
|
5729 | <param name="max">The maximum number of elements to write</param> | |
|
5730 | </member> | |
|
5731 | <member name="P:NUnit.Framework.Constraints.MessageWriter.MaxLineLength"> | |
|
5732 | <summary> | |
|
5733 | Abstract method to get the max line length | |
|
5734 | </summary> | |
|
5735 | </member> | |
|
5736 | <member name="F:NUnit.Framework.TextMessageWriter.Pfx_Expected"> | |
|
5737 | <summary> | |
|
5738 | Prefix used for the expected value line of a message | |
|
5739 | </summary> | |
|
5740 | </member> | |
|
5741 | <member name="F:NUnit.Framework.TextMessageWriter.Pfx_Actual"> | |
|
5742 | <summary> | |
|
5743 | Prefix used for the actual value line of a message | |
|
5744 | </summary> | |
|
5745 | </member> | |
|
5746 | <member name="F:NUnit.Framework.TextMessageWriter.PrefixLength"> | |
|
5747 | <summary> | |
|
5748 | Length of a message prefix | |
|
5749 | </summary> | |
|
5750 | </member> | |
|
5751 | <member name="M:NUnit.Framework.TextMessageWriter.#ctor"> | |
|
5752 | <summary> | |
|
5753 | Construct a TextMessageWriter | |
|
5754 | </summary> | |
|
5755 | </member> | |
|
5756 | <member name="M:NUnit.Framework.TextMessageWriter.#ctor(System.String,System.Object[])"> | |
|
5757 | <summary> | |
|
5758 | Construct a TextMessageWriter, specifying a user message | |
|
5759 | and optional formatting arguments. | |
|
5760 | </summary> | |
|
5761 | <param name="userMessage"></param> | |
|
5762 | <param name="args"></param> | |
|
5763 | </member> | |
|
5764 | <member name="M:NUnit.Framework.TextMessageWriter.WriteMessageLine(System.Int32,System.String,System.Object[])"> | |
|
5765 | <summary> | |
|
5766 | Method to write single line message with optional args, usually | |
|
5767 | written to precede the general failure message, at a givel | |
|
5768 | indentation level. | |
|
5769 | </summary> | |
|
5770 | <param name="level">The indentation level of the message</param> | |
|
5771 | <param name="message">The message to be written</param> | |
|
5772 | <param name="args">Any arguments used in formatting the message</param> | |
|
5773 | </member> | |
|
5774 | <member name="M:NUnit.Framework.TextMessageWriter.DisplayDifferences(NUnit.Framework.Constraints.Constraint)"> | |
|
5775 | <summary> | |
|
5776 | Display Expected and Actual lines for a constraint. This | |
|
5777 | is called by MessageWriter's default implementation of | |
|
5778 | WriteMessageTo and provides the generic two-line display. | |
|
5779 | </summary> | |
|
5780 | <param name="constraint">The constraint that failed</param> | |
|
5781 | </member> | |
|
5782 | <member name="M:NUnit.Framework.TextMessageWriter.DisplayDifferences(System.Object,System.Object)"> | |
|
5783 | <summary> | |
|
5784 | Display Expected and Actual lines for given values. This | |
|
5785 | method may be called by constraints that need more control over | |
|
5786 | the display of actual and expected values than is provided | |
|
5787 | by the default implementation. | |
|
5788 | </summary> | |
|
5789 | <param name="expected">The expected value</param> | |
|
5790 | <param name="actual">The actual value causing the failure</param> | |
|
5791 | </member> | |
|
5792 | <member name="M:NUnit.Framework.TextMessageWriter.DisplayDifferences(System.Object,System.Object,NUnit.Framework.Constraints.Tolerance)"> | |
|
5793 | <summary> | |
|
5794 | Display Expected and Actual lines for given values, including | |
|
5795 | a tolerance value on the expected line. | |
|
5796 | </summary> | |
|
5797 | <param name="expected">The expected value</param> | |
|
5798 | <param name="actual">The actual value causing the failure</param> | |
|
5799 | <param name="tolerance">The tolerance within which the test was made</param> | |
|
5800 | </member> | |
|
5801 | <member name="M:NUnit.Framework.TextMessageWriter.DisplayStringDifferences(System.String,System.String,System.Int32,System.Boolean,System.Boolean)"> | |
|
5802 | <summary> | |
|
5803 | Display the expected and actual string values on separate lines. | |
|
5804 | If the mismatch parameter is >=0, an additional line is displayed | |
|
5805 | line containing a caret that points to the mismatch point. | |
|
5806 | </summary> | |
|
5807 | <param name="expected">The expected string value</param> | |
|
5808 | <param name="actual">The actual string value</param> | |
|
5809 | <param name="mismatch">The point at which the strings don't match or -1</param> | |
|
5810 | <param name="ignoreCase">If true, case is ignored in string comparisons</param> | |
|
5811 | <param name="clipping">If true, clip the strings to fit the max line length</param> | |
|
5812 | </member> | |
|
5813 | <member name="M:NUnit.Framework.TextMessageWriter.WriteConnector(System.String)"> | |
|
5814 | <summary> | |
|
5815 | Writes the text for a connector. | |
|
5816 | </summary> | |
|
5817 | <param name="connector">The connector.</param> | |
|
5818 | </member> | |
|
5819 | <member name="M:NUnit.Framework.TextMessageWriter.WritePredicate(System.String)"> | |
|
5820 | <summary> | |
|
5821 | Writes the text for a predicate. | |
|
5822 | </summary> | |
|
5823 | <param name="predicate">The predicate.</param> | |
|
5824 | </member> | |
|
5825 | <member name="M:NUnit.Framework.TextMessageWriter.WriteModifier(System.String)"> | |
|
5826 | <summary> | |
|
5827 | Write the text for a modifier. | |
|
5828 | </summary> | |
|
5829 | <param name="modifier">The modifier.</param> | |
|
5830 | </member> | |
|
5831 | <member name="M:NUnit.Framework.TextMessageWriter.WriteExpectedValue(System.Object)"> | |
|
5832 | <summary> | |
|
5833 | Writes the text for an expected value. | |
|
5834 | </summary> | |
|
5835 | <param name="expected">The expected value.</param> | |
|
5836 | </member> | |
|
5837 | <member name="M:NUnit.Framework.TextMessageWriter.WriteActualValue(System.Object)"> | |
|
5838 | <summary> | |
|
5839 | Writes the text for an actual value. | |
|
5840 | </summary> | |
|
5841 | <param name="actual">The actual value.</param> | |
|
5842 | </member> | |
|
5843 | <member name="M:NUnit.Framework.TextMessageWriter.WriteValue(System.Object)"> | |
|
5844 | <summary> | |
|
5845 | Writes the text for a generalized value. | |
|
5846 | </summary> | |
|
5847 | <param name="val">The value.</param> | |
|
5848 | </member> | |
|
5849 | <member name="M:NUnit.Framework.TextMessageWriter.WriteCollectionElements(System.Collections.IEnumerable,System.Int32,System.Int32)"> | |
|
5850 | <summary> | |
|
5851 | Writes the text for a collection value, | |
|
5852 | starting at a particular point, to a max length | |
|
5853 | </summary> | |
|
5854 | <param name="collection">The collection containing elements to write.</param> | |
|
5855 | <param name="start">The starting point of the elements to write</param> | |
|
5856 | <param name="max">The maximum number of elements to write</param> | |
|
5857 | </member> | |
|
5858 | <member name="M:NUnit.Framework.TextMessageWriter.WriteExpectedLine(NUnit.Framework.Constraints.Constraint)"> | |
|
5859 | <summary> | |
|
5860 | Write the generic 'Expected' line for a constraint | |
|
5861 | </summary> | |
|
5862 | <param name="constraint">The constraint that failed</param> | |
|
5863 | </member> | |
|
5864 | <member name="M:NUnit.Framework.TextMessageWriter.WriteExpectedLine(System.Object)"> | |
|
5865 | <summary> | |
|
5866 | Write the generic 'Expected' line for a given value | |
|
5867 | </summary> | |
|
5868 | <param name="expected">The expected value</param> | |
|
5869 | </member> | |
|
5870 | <member name="M:NUnit.Framework.TextMessageWriter.WriteExpectedLine(System.Object,NUnit.Framework.Constraints.Tolerance)"> | |
|
5871 | <summary> | |
|
5872 | Write the generic 'Expected' line for a given value | |
|
5873 | and tolerance. | |
|
5874 | </summary> | |
|
5875 | <param name="expected">The expected value</param> | |
|
5876 | <param name="tolerance">The tolerance within which the test was made</param> | |
|
5877 | </member> | |
|
5878 | <member name="M:NUnit.Framework.TextMessageWriter.WriteActualLine(NUnit.Framework.Constraints.Constraint)"> | |
|
5879 | <summary> | |
|
5880 | Write the generic 'Actual' line for a constraint | |
|
5881 | </summary> | |
|
5882 | <param name="constraint">The constraint for which the actual value is to be written</param> | |
|
5883 | </member> | |
|
5884 | <member name="M:NUnit.Framework.TextMessageWriter.WriteActualLine(System.Object)"> | |
|
5885 | <summary> | |
|
5886 | Write the generic 'Actual' line for a given value | |
|
5887 | </summary> | |
|
5888 | <param name="actual">The actual value causing a failure</param> | |
|
5889 | </member> | |
|
5890 | <member name="P:NUnit.Framework.TextMessageWriter.MaxLineLength"> | |
|
5891 | <summary> | |
|
5892 | Gets or sets the maximum line length for this writer | |
|
5893 | </summary> | |
|
5894 | </member> | |
|
5895 | <member name="T:NUnit.Framework.Throws"> | |
|
5896 | <summary> | |
|
5897 | Helper class with properties and methods that supply | |
|
5898 | constraints that operate on exceptions. | |
|
5899 | </summary> | |
|
5900 | </member> | |
|
5901 | <member name="M:NUnit.Framework.Throws.TypeOf(System.Type)"> | |
|
5902 | <summary> | |
|
5903 | Creates a constraint specifying the exact type of exception expected | |
|
5904 | </summary> | |
|
5905 | </member> | |
|
5906 | <member name="M:NUnit.Framework.Throws.TypeOf``1"> | |
|
5907 | <summary> | |
|
5908 | Creates a constraint specifying the exact type of exception expected | |
|
5909 | </summary> | |
|
5910 | </member> | |
|
5911 | <member name="M:NUnit.Framework.Throws.InstanceOf(System.Type)"> | |
|
5912 | <summary> | |
|
5913 | Creates a constraint specifying the type of exception expected | |
|
5914 | </summary> | |
|
5915 | </member> | |
|
5916 | <member name="M:NUnit.Framework.Throws.InstanceOf``1"> | |
|
5917 | <summary> | |
|
5918 | Creates a constraint specifying the type of exception expected | |
|
5919 | </summary> | |
|
5920 | </member> | |
|
5921 | <member name="P:NUnit.Framework.Throws.Exception"> | |
|
5922 | <summary> | |
|
5923 | Creates a constraint specifying an expected exception | |
|
5924 | </summary> | |
|
5925 | </member> | |
|
5926 | <member name="P:NUnit.Framework.Throws.InnerException"> | |
|
5927 | <summary> | |
|
5928 | Creates a constraint specifying an exception with a given InnerException | |
|
5929 | </summary> | |
|
5930 | </member> | |
|
5931 | <member name="P:NUnit.Framework.Throws.TargetInvocationException"> | |
|
5932 | <summary> | |
|
5933 | Creates a constraint specifying an expected TargetInvocationException | |
|
5934 | </summary> | |
|
5935 | </member> | |
|
5936 | <member name="P:NUnit.Framework.Throws.ArgumentException"> | |
|
5937 | <summary> | |
|
5938 | Creates a constraint specifying an expected TargetInvocationException | |
|
5939 | </summary> | |
|
5940 | </member> | |
|
5941 | <member name="P:NUnit.Framework.Throws.InvalidOperationException"> | |
|
5942 | <summary> | |
|
5943 | Creates a constraint specifying an expected TargetInvocationException | |
|
5944 | </summary> | |
|
5945 | </member> | |
|
5946 | <member name="P:NUnit.Framework.Throws.Nothing"> | |
|
5947 | <summary> | |
|
5948 | Creates a constraint specifying that no exception is thrown | |
|
5949 | </summary> | |
|
5950 | </member> | |
|
5951 | <member name="T:NUnit.Framework.CategoryAttribute"> | |
|
5952 | <summary> | |
|
5953 | Attribute used to apply a category to a test | |
|
5954 | </summary> | |
|
5955 | </member> | |
|
5956 | <member name="F:NUnit.Framework.CategoryAttribute.categoryName"> | |
|
5957 | <summary> | |
|
5958 | The name of the category | |
|
5959 | </summary> | |
|
5960 | </member> | |
|
5961 | <member name="M:NUnit.Framework.CategoryAttribute.#ctor(System.String)"> | |
|
5962 | <summary> | |
|
5963 | Construct attribute for a given category based on | |
|
5964 | a name. The name may not contain the characters ',', | |
|
5965 | '+', '-' or '!'. However, this is not checked in the | |
|
5966 | constructor since it would cause an error to arise at | |
|
5967 | as the test was loaded without giving a clear indication | |
|
5968 | of where the problem is located. The error is handled | |
|
5969 | in NUnitFramework.cs by marking the test as not | |
|
5970 | runnable. | |
|
5971 | </summary> | |
|
5972 | <param name="name">The name of the category</param> | |
|
5973 | </member> | |
|
5974 | <member name="M:NUnit.Framework.CategoryAttribute.#ctor"> | |
|
5975 | <summary> | |
|
5976 | Protected constructor uses the Type name as the name | |
|
5977 | of the category. | |
|
5978 | </summary> | |
|
5979 | </member> | |
|
5980 | <member name="P:NUnit.Framework.CategoryAttribute.Name"> | |
|
5981 | <summary> | |
|
5982 | The name of the category | |
|
5983 | </summary> | |
|
5984 | </member> | |
|
5985 | <member name="T:NUnit.Framework.DatapointAttribute"> | |
|
5986 | <summary> | |
|
5987 | Used to mark a field for use as a datapoint when executing a theory | |
|
5988 | within the same fixture that requires an argument of the field's Type. | |
|
5989 | </summary> | |
|
5990 | </member> | |
|
5991 | <member name="T:NUnit.Framework.DatapointsAttribute"> | |
|
5992 | <summary> | |
|
5993 | Used to mark an array as containing a set of datapoints to be used | |
|
5994 | executing a theory within the same fixture that requires an argument | |
|
5995 | of the Type of the array elements. | |
|
5996 | </summary> | |
|
5997 | </member> | |
|
5998 | <member name="T:NUnit.Framework.DescriptionAttribute"> | |
|
5999 | <summary> | |
|
6000 | Attribute used to provide descriptive text about a | |
|
6001 | test case or fixture. | |
|
6002 | </summary> | |
|
6003 | </member> | |
|
6004 | <member name="M:NUnit.Framework.DescriptionAttribute.#ctor(System.String)"> | |
|
6005 | <summary> | |
|
6006 | Construct the attribute | |
|
6007 | </summary> | |
|
6008 | <param name="description">Text describing the test</param> | |
|
6009 | </member> | |
|
6010 | <member name="P:NUnit.Framework.DescriptionAttribute.Description"> | |
|
6011 | <summary> | |
|
6012 | Gets the test description | |
|
6013 | </summary> | |
|
6014 | </member> | |
|
6015 | <member name="T:NUnit.Framework.MessageMatch"> | |
|
6016 | <summary> | |
|
6017 | Enumeration indicating how the expected message parameter is to be used | |
|
6018 | </summary> | |
|
6019 | </member> | |
|
6020 | <member name="F:NUnit.Framework.MessageMatch.Exact"> | |
|
6021 | Expect an exact match | |
|
6022 | </member> | |
|
6023 | <member name="F:NUnit.Framework.MessageMatch.Contains"> | |
|
6024 | Expect a message containing the parameter string | |
|
6025 | </member> | |
|
6026 | <member name="F:NUnit.Framework.MessageMatch.Regex"> | |
|
6027 | Match the regular expression provided as a parameter | |
|
6028 | </member> | |
|
6029 | <member name="F:NUnit.Framework.MessageMatch.StartsWith"> | |
|
6030 | Expect a message that starts with the parameter string | |
|
6031 | </member> | |
|
6032 | <member name="T:NUnit.Framework.ExpectedExceptionAttribute"> | |
|
6033 | <summary> | |
|
6034 | ExpectedExceptionAttribute | |
|
6035 | </summary> | |
|
6036 | ||
|
6037 | </member> | |
|
6038 | <member name="M:NUnit.Framework.ExpectedExceptionAttribute.#ctor"> | |
|
6039 | <summary> | |
|
6040 | Constructor for a non-specific exception | |
|
6041 | </summary> | |
|
6042 | </member> | |
|
6043 | <member name="M:NUnit.Framework.ExpectedExceptionAttribute.#ctor(System.Type)"> | |
|
6044 | <summary> | |
|
6045 | Constructor for a given type of exception | |
|
6046 | </summary> | |
|
6047 | <param name="exceptionType">The type of the expected exception</param> | |
|
6048 | </member> | |
|
6049 | <member name="M:NUnit.Framework.ExpectedExceptionAttribute.#ctor(System.String)"> | |
|
6050 | <summary> | |
|
6051 | Constructor for a given exception name | |
|
6052 | </summary> | |
|
6053 | <param name="exceptionName">The full name of the expected exception</param> | |
|
6054 | </member> | |
|
6055 | <member name="P:NUnit.Framework.ExpectedExceptionAttribute.ExpectedException"> | |
|
6056 | <summary> | |
|
6057 | Gets or sets the expected exception type | |
|
6058 | </summary> | |
|
6059 | </member> | |
|
6060 | <member name="P:NUnit.Framework.ExpectedExceptionAttribute.ExpectedExceptionName"> | |
|
6061 | <summary> | |
|
6062 | Gets or sets the full Type name of the expected exception | |
|
6063 | </summary> | |
|
6064 | </member> | |
|
6065 | <member name="P:NUnit.Framework.ExpectedExceptionAttribute.ExpectedMessage"> | |
|
6066 | <summary> | |
|
6067 | Gets or sets the expected message text | |
|
6068 | </summary> | |
|
6069 | </member> | |
|
6070 | <member name="P:NUnit.Framework.ExpectedExceptionAttribute.UserMessage"> | |
|
6071 | <summary> | |
|
6072 | Gets or sets the user message displayed in case of failure | |
|
6073 | </summary> | |
|
6074 | </member> | |
|
6075 | <member name="P:NUnit.Framework.ExpectedExceptionAttribute.MatchType"> | |
|
6076 | <summary> | |
|
6077 | Gets or sets the type of match to be performed on the expected message | |
|
6078 | </summary> | |
|
6079 | </member> | |
|
6080 | <member name="P:NUnit.Framework.ExpectedExceptionAttribute.Handler"> | |
|
6081 | <summary> | |
|
6082 | Gets the name of a method to be used as an exception handler | |
|
6083 | </summary> | |
|
6084 | </member> | |
|
6085 | <member name="T:NUnit.Framework.ExplicitAttribute"> | |
|
6086 | <summary> | |
|
6087 | ExplicitAttribute marks a test or test fixture so that it will | |
|
6088 | only be run if explicitly executed from the gui or command line | |
|
6089 | or if it is included by use of a filter. The test will not be | |
|
6090 | run simply because an enclosing suite is run. | |
|
6091 | </summary> | |
|
6092 | </member> | |
|
6093 | <member name="M:NUnit.Framework.ExplicitAttribute.#ctor"> | |
|
6094 | <summary> | |
|
6095 | Default constructor | |
|
6096 | </summary> | |
|
6097 | </member> | |
|
6098 | <member name="M:NUnit.Framework.ExplicitAttribute.#ctor(System.String)"> | |
|
6099 | <summary> | |
|
6100 | Constructor with a reason | |
|
6101 | </summary> | |
|
6102 | <param name="reason">The reason test is marked explicit</param> | |
|
6103 | </member> | |
|
6104 | <member name="P:NUnit.Framework.ExplicitAttribute.Reason"> | |
|
6105 | <summary> | |
|
6106 | The reason test is marked explicit | |
|
6107 | </summary> | |
|
6108 | </member> | |
|
6109 | <member name="T:NUnit.Framework.IgnoreAttribute"> | |
|
6110 | <summary> | |
|
6111 | Attribute used to mark a test that is to be ignored. | |
|
6112 | Ignored tests result in a warning message when the | |
|
6113 | tests are run. | |
|
6114 | </summary> | |
|
6115 | </member> | |
|
6116 | <member name="M:NUnit.Framework.IgnoreAttribute.#ctor"> | |
|
6117 | <summary> | |
|
6118 | Constructs the attribute without giving a reason | |
|
6119 | for ignoring the test. | |
|
6120 | </summary> | |
|
6121 | </member> | |
|
6122 | <member name="M:NUnit.Framework.IgnoreAttribute.#ctor(System.String)"> | |
|
6123 | <summary> | |
|
6124 | Constructs the attribute giving a reason for ignoring the test | |
|
6125 | </summary> | |
|
6126 | <param name="reason">The reason for ignoring the test</param> | |
|
6127 | </member> | |
|
6128 | <member name="P:NUnit.Framework.IgnoreAttribute.Reason"> | |
|
6129 | <summary> | |
|
6130 | The reason for ignoring a test | |
|
6131 | </summary> | |
|
6132 | </member> | |
|
6133 | <member name="T:NUnit.Framework.IncludeExcludeAttribute"> | |
|
6134 | <summary> | |
|
6135 | Abstract base for Attributes that are used to include tests | |
|
6136 | in the test run based on environmental settings. | |
|
6137 | </summary> | |
|
6138 | </member> | |
|
6139 | <member name="M:NUnit.Framework.IncludeExcludeAttribute.#ctor"> | |
|
6140 | <summary> | |
|
6141 | Constructor with no included items specified, for use | |
|
6142 | with named property syntax. | |
|
6143 | </summary> | |
|
6144 | </member> | |
|
6145 | <member name="M:NUnit.Framework.IncludeExcludeAttribute.#ctor(System.String)"> | |
|
6146 | <summary> | |
|
6147 | Constructor taking one or more included items | |
|
6148 | </summary> | |
|
6149 | <param name="include">Comma-delimited list of included items</param> | |
|
6150 | </member> | |
|
6151 | <member name="P:NUnit.Framework.IncludeExcludeAttribute.Include"> | |
|
6152 | <summary> | |
|
6153 | Name of the item that is needed in order for | |
|
6154 | a test to run. Multiple itemss may be given, | |
|
6155 | separated by a comma. | |
|
6156 | </summary> | |
|
6157 | </member> | |
|
6158 | <member name="P:NUnit.Framework.IncludeExcludeAttribute.Exclude"> | |
|
6159 | <summary> | |
|
6160 | Name of the item to be excluded. Multiple items | |
|
6161 | may be given, separated by a comma. | |
|
6162 | </summary> | |
|
6163 | </member> | |
|
6164 | <member name="P:NUnit.Framework.IncludeExcludeAttribute.Reason"> | |
|
6165 | <summary> | |
|
6166 | The reason for including or excluding the test | |
|
6167 | </summary> | |
|
6168 | </member> | |
|
6169 | <member name="T:NUnit.Framework.PlatformAttribute"> | |
|
6170 | <summary> | |
|
6171 | PlatformAttribute is used to mark a test fixture or an | |
|
6172 | individual method as applying to a particular platform only. | |
|
6173 | </summary> | |
|
6174 | </member> | |
|
6175 | <member name="M:NUnit.Framework.PlatformAttribute.#ctor"> | |
|
6176 | <summary> | |
|
6177 | Constructor with no platforms specified, for use | |
|
6178 | with named property syntax. | |
|
6179 | </summary> | |
|
6180 | </member> | |
|
6181 | <member name="M:NUnit.Framework.PlatformAttribute.#ctor(System.String)"> | |
|
6182 | <summary> | |
|
6183 | Constructor taking one or more platforms | |
|
6184 | </summary> | |
|
6185 | <param name="platforms">Comma-deliminted list of platforms</param> | |
|
6186 | </member> | |
|
6187 | <member name="T:NUnit.Framework.CultureAttribute"> | |
|
6188 | <summary> | |
|
6189 | CultureAttribute is used to mark a test fixture or an | |
|
6190 | individual method as applying to a particular Culture only. | |
|
6191 | </summary> | |
|
6192 | </member> | |
|
6193 | <member name="M:NUnit.Framework.CultureAttribute.#ctor"> | |
|
6194 | <summary> | |
|
6195 | Constructor with no cultures specified, for use | |
|
6196 | with named property syntax. | |
|
6197 | </summary> | |
|
6198 | </member> | |
|
6199 | <member name="M:NUnit.Framework.CultureAttribute.#ctor(System.String)"> | |
|
6200 | <summary> | |
|
6201 | Constructor taking one or more cultures | |
|
6202 | </summary> | |
|
6203 | <param name="cultures">Comma-deliminted list of cultures</param> | |
|
6204 | </member> | |
|
6205 | <member name="T:NUnit.Framework.CombinatorialAttribute"> | |
|
6206 | <summary> | |
|
6207 | Marks a test to use a combinatorial join of any argument data | |
|
6208 | provided. NUnit will create a test case for every combination of | |
|
6209 | the arguments provided. This can result in a large number of test | |
|
6210 | cases and so should be used judiciously. This is the default join | |
|
6211 | type, so the attribute need not be used except as documentation. | |
|
6212 | </summary> | |
|
6213 | </member> | |
|
6214 | <member name="T:NUnit.Framework.PropertyAttribute"> | |
|
6215 | <summary> | |
|
6216 | PropertyAttribute is used to attach information to a test as a name/value pair.. | |
|
6217 | </summary> | |
|
6218 | </member> | |
|
6219 | <member name="M:NUnit.Framework.PropertyAttribute.#ctor(System.String,System.String)"> | |
|
6220 | <summary> | |
|
6221 | Construct a PropertyAttribute with a name and string value | |
|
6222 | </summary> | |
|
6223 | <param name="propertyName">The name of the property</param> | |
|
6224 | <param name="propertyValue">The property value</param> | |
|
6225 | </member> | |
|
6226 | <member name="M:NUnit.Framework.PropertyAttribute.#ctor(System.String,System.Int32)"> | |
|
6227 | <summary> | |
|
6228 | Construct a PropertyAttribute with a name and int value | |
|
6229 | </summary> | |
|
6230 | <param name="propertyName">The name of the property</param> | |
|
6231 | <param name="propertyValue">The property value</param> | |
|
6232 | </member> | |
|
6233 | <member name="M:NUnit.Framework.PropertyAttribute.#ctor(System.String,System.Double)"> | |
|
6234 | <summary> | |
|
6235 | Construct a PropertyAttribute with a name and double value | |
|
6236 | </summary> | |
|
6237 | <param name="propertyName">The name of the property</param> | |
|
6238 | <param name="propertyValue">The property value</param> | |
|
6239 | </member> | |
|
6240 | <member name="M:NUnit.Framework.PropertyAttribute.#ctor"> | |
|
6241 | <summary> | |
|
6242 | Constructor for derived classes that set the | |
|
6243 | property dictionary directly. | |
|
6244 | </summary> | |
|
6245 | </member> | |
|
6246 | <member name="M:NUnit.Framework.PropertyAttribute.#ctor(System.Object)"> | |
|
6247 | <summary> | |
|
6248 | Constructor for use by derived classes that use the | |
|
6249 | name of the type as the property name. Derived classes | |
|
6250 | must ensure that the Type of the property value is | |
|
6251 | a standard type supported by the BCL. Any custom | |
|
6252 | types will cause a serialization Exception when | |
|
6253 | in the client. | |
|
6254 | </summary> | |
|
6255 | </member> | |
|
6256 | <member name="P:NUnit.Framework.PropertyAttribute.Properties"> | |
|
6257 | <summary> | |
|
6258 | Gets the property dictionary for this attribute | |
|
6259 | </summary> | |
|
6260 | </member> | |
|
6261 | <member name="M:NUnit.Framework.CombinatorialAttribute.#ctor"> | |
|
6262 | <summary> | |
|
6263 | Default constructor | |
|
6264 | </summary> | |
|
6265 | </member> | |
|
6266 | <member name="T:NUnit.Framework.PairwiseAttribute"> | |
|
6267 | <summary> | |
|
6268 | Marks a test to use pairwise join of any argument data provided. | |
|
6269 | NUnit will attempt too excercise every pair of argument values at | |
|
6270 | least once, using as small a number of test cases as it can. With | |
|
6271 | only two arguments, this is the same as a combinatorial join. | |
|
6272 | </summary> | |
|
6273 | </member> | |
|
6274 | <member name="M:NUnit.Framework.PairwiseAttribute.#ctor"> | |
|
6275 | <summary> | |
|
6276 | Default constructor | |
|
6277 | </summary> | |
|
6278 | </member> | |
|
6279 | <member name="T:NUnit.Framework.SequentialAttribute"> | |
|
6280 | <summary> | |
|
6281 | Marks a test to use a sequential join of any argument data | |
|
6282 | provided. NUnit will use arguements for each parameter in | |
|
6283 | sequence, generating test cases up to the largest number | |
|
6284 | of argument values provided and using null for any arguments | |
|
6285 | for which it runs out of values. Normally, this should be | |
|
6286 | used with the same number of arguments for each parameter. | |
|
6287 | </summary> | |
|
6288 | </member> | |
|
6289 | <member name="M:NUnit.Framework.SequentialAttribute.#ctor"> | |
|
6290 | <summary> | |
|
6291 | Default constructor | |
|
6292 | </summary> | |
|
6293 | </member> | |
|
6294 | <member name="T:NUnit.Framework.MaxTimeAttribute"> | |
|
6295 | <summary> | |
|
6296 | Summary description for MaxTimeAttribute. | |
|
6297 | </summary> | |
|
6298 | </member> | |
|
6299 | <member name="M:NUnit.Framework.MaxTimeAttribute.#ctor(System.Int32)"> | |
|
6300 | <summary> | |
|
6301 | Construct a MaxTimeAttribute, given a time in milliseconds. | |
|
6302 | </summary> | |
|
6303 | <param name="milliseconds">The maximum elapsed time in milliseconds</param> | |
|
6304 | </member> | |
|
6305 | <member name="T:NUnit.Framework.RandomAttribute"> | |
|
6306 | <summary> | |
|
6307 | RandomAttribute is used to supply a set of random values | |
|
6308 | to a single parameter of a parameterized test. | |
|
6309 | </summary> | |
|
6310 | </member> | |
|
6311 | <member name="T:NUnit.Framework.ValuesAttribute"> | |
|
6312 | <summary> | |
|
6313 | ValuesAttribute is used to provide literal arguments for | |
|
6314 | an individual parameter of a test. | |
|
6315 | </summary> | |
|
6316 | </member> | |
|
6317 | <member name="T:NUnit.Framework.ParameterDataAttribute"> | |
|
6318 | <summary> | |
|
6319 | Abstract base class for attributes that apply to parameters | |
|
6320 | and supply data for the parameter. | |
|
6321 | </summary> | |
|
6322 | </member> | |
|
6323 | <member name="M:NUnit.Framework.ParameterDataAttribute.GetData(System.Reflection.ParameterInfo)"> | |
|
6324 | <summary> | |
|
6325 | Gets the data to be provided to the specified parameter | |
|
6326 | </summary> | |
|
6327 | </member> | |
|
6328 | <member name="F:NUnit.Framework.ValuesAttribute.data"> | |
|
6329 | <summary> | |
|
6330 | The collection of data to be returned. Must | |
|
6331 | be set by any derived attribute classes. | |
|
6332 | We use an object[] so that the individual | |
|
6333 | elements may have their type changed in GetData | |
|
6334 | if necessary. | |
|
6335 | </summary> | |
|
6336 | </member> | |
|
6337 | <member name="M:NUnit.Framework.ValuesAttribute.#ctor(System.Object)"> | |
|
6338 | <summary> | |
|
6339 | Construct with one argument | |
|
6340 | </summary> | |
|
6341 | <param name="arg1"></param> | |
|
6342 | </member> | |
|
6343 | <member name="M:NUnit.Framework.ValuesAttribute.#ctor(System.Object,System.Object)"> | |
|
6344 | <summary> | |
|
6345 | Construct with two arguments | |
|
6346 | </summary> | |
|
6347 | <param name="arg1"></param> | |
|
6348 | <param name="arg2"></param> | |
|
6349 | </member> | |
|
6350 | <member name="M:NUnit.Framework.ValuesAttribute.#ctor(System.Object,System.Object,System.Object)"> | |
|
6351 | <summary> | |
|
6352 | Construct with three arguments | |
|
6353 | </summary> | |
|
6354 | <param name="arg1"></param> | |
|
6355 | <param name="arg2"></param> | |
|
6356 | <param name="arg3"></param> | |
|
6357 | </member> | |
|
6358 | <member name="M:NUnit.Framework.ValuesAttribute.#ctor(System.Object[])"> | |
|
6359 | <summary> | |
|
6360 | Construct with an array of arguments | |
|
6361 | </summary> | |
|
6362 | <param name="args"></param> | |
|
6363 | </member> | |
|
6364 | <member name="M:NUnit.Framework.ValuesAttribute.GetData(System.Reflection.ParameterInfo)"> | |
|
6365 | <summary> | |
|
6366 | Get the collection of values to be used as arguments | |
|
6367 | </summary> | |
|
6368 | </member> | |
|
6369 | <member name="M:NUnit.Framework.RandomAttribute.#ctor(System.Int32)"> | |
|
6370 | <summary> | |
|
6371 | Construct a set of doubles from 0.0 to 1.0, | |
|
6372 | specifying only the count. | |
|
6373 | </summary> | |
|
6374 | <param name="count"></param> | |
|
6375 | </member> | |
|
6376 | <member name="M:NUnit.Framework.RandomAttribute.#ctor(System.Double,System.Double,System.Int32)"> | |
|
6377 | <summary> | |
|
6378 | Construct a set of doubles from min to max | |
|
6379 | </summary> | |
|
6380 | <param name="min"></param> | |
|
6381 | <param name="max"></param> | |
|
6382 | <param name="count"></param> | |
|
6383 | </member> | |
|
6384 | <member name="M:NUnit.Framework.RandomAttribute.#ctor(System.Int32,System.Int32,System.Int32)"> | |
|
6385 | <summary> | |
|
6386 | Construct a set of ints from min to max | |
|
6387 | </summary> | |
|
6388 | <param name="min"></param> | |
|
6389 | <param name="max"></param> | |
|
6390 | <param name="count"></param> | |
|
6391 | </member> | |
|
6392 | <member name="M:NUnit.Framework.RandomAttribute.GetData(System.Reflection.ParameterInfo)"> | |
|
6393 | <summary> | |
|
6394 | Get the collection of values to be used as arguments | |
|
6395 | </summary> | |
|
6396 | </member> | |
|
6397 | <member name="T:NUnit.Framework.RangeAttribute"> | |
|
6398 | <summary> | |
|
6399 | RangeAttribute is used to supply a range of values to an | |
|
6400 | individual parameter of a parameterized test. | |
|
6401 | </summary> | |
|
6402 | </member> | |
|
6403 | <member name="M:NUnit.Framework.RangeAttribute.#ctor(System.Int32,System.Int32)"> | |
|
6404 | <summary> | |
|
6405 | Construct a range of ints using default step of 1 | |
|
6406 | </summary> | |
|
6407 | <param name="from"></param> | |
|
6408 | <param name="to"></param> | |
|
6409 | </member> | |
|
6410 | <member name="M:NUnit.Framework.RangeAttribute.#ctor(System.Int32,System.Int32,System.Int32)"> | |
|
6411 | <summary> | |
|
6412 | Construct a range of ints specifying the step size | |
|
6413 | </summary> | |
|
6414 | <param name="from"></param> | |
|
6415 | <param name="to"></param> | |
|
6416 | <param name="step"></param> | |
|
6417 | </member> | |
|
6418 | <member name="M:NUnit.Framework.RangeAttribute.#ctor(System.Int64,System.Int64,System.Int64)"> | |
|
6419 | <summary> | |
|
6420 | Construct a range of longs | |
|
6421 | </summary> | |
|
6422 | <param name="from"></param> | |
|
6423 | <param name="to"></param> | |
|
6424 | <param name="step"></param> | |
|
6425 | </member> | |
|
6426 | <member name="M:NUnit.Framework.RangeAttribute.#ctor(System.Double,System.Double,System.Double)"> | |
|
6427 | <summary> | |
|
6428 | Construct a range of doubles | |
|
6429 | </summary> | |
|
6430 | <param name="from"></param> | |
|
6431 | <param name="to"></param> | |
|
6432 | <param name="step"></param> | |
|
6433 | </member> | |
|
6434 | <member name="M:NUnit.Framework.RangeAttribute.#ctor(System.Single,System.Single,System.Single)"> | |
|
6435 | <summary> | |
|
6436 | Construct a range of floats | |
|
6437 | </summary> | |
|
6438 | <param name="from"></param> | |
|
6439 | <param name="to"></param> | |
|
6440 | <param name="step"></param> | |
|
6441 | </member> | |
|
6442 | <member name="T:NUnit.Framework.RepeatAttribute"> | |
|
6443 | <summary> | |
|
6444 | RepeatAttribute may be applied to test case in order | |
|
6445 | to run it multiple times. | |
|
6446 | </summary> | |
|
6447 | </member> | |
|
6448 | <member name="M:NUnit.Framework.RepeatAttribute.#ctor(System.Int32)"> | |
|
6449 | <summary> | |
|
6450 | Construct a RepeatAttribute | |
|
6451 | </summary> | |
|
6452 | <param name="count">The number of times to run the test</param> | |
|
6453 | </member> | |
|
6454 | <member name="T:NUnit.Framework.RequiredAddinAttribute"> | |
|
6455 | <summary> | |
|
6456 | RequiredAddinAttribute may be used to indicate the names of any addins | |
|
6457 | that must be present in order to run some or all of the tests in an | |
|
6458 | assembly. If the addin is not loaded, the entire assembly is marked | |
|
6459 | as NotRunnable. | |
|
6460 | </summary> | |
|
6461 | </member> | |
|
6462 | <member name="M:NUnit.Framework.RequiredAddinAttribute.#ctor(System.String)"> | |
|
6463 | <summary> | |
|
6464 | Initializes a new instance of the <see cref="T:RequiredAddinAttribute"/> class. | |
|
6465 | </summary> | |
|
6466 | <param name="requiredAddin">The required addin.</param> | |
|
6467 | </member> | |
|
6468 | <member name="P:NUnit.Framework.RequiredAddinAttribute.RequiredAddin"> | |
|
6469 | <summary> | |
|
6470 | Gets the name of required addin. | |
|
6471 | </summary> | |
|
6472 | <value>The required addin name.</value> | |
|
6473 | </member> | |
|
6474 | <member name="T:NUnit.Framework.SetCultureAttribute"> | |
|
6475 | <summary> | |
|
6476 | Summary description for SetCultureAttribute. | |
|
6477 | </summary> | |
|
6478 | </member> | |
|
6479 | <member name="M:NUnit.Framework.SetCultureAttribute.#ctor(System.String)"> | |
|
6480 | <summary> | |
|
6481 | Construct given the name of a culture | |
|
6482 | </summary> | |
|
6483 | <param name="culture"></param> | |
|
6484 | </member> | |
|
6485 | <member name="T:NUnit.Framework.SetUICultureAttribute"> | |
|
6486 | <summary> | |
|
6487 | Summary description for SetUICultureAttribute. | |
|
6488 | </summary> | |
|
6489 | </member> | |
|
6490 | <member name="M:NUnit.Framework.SetUICultureAttribute.#ctor(System.String)"> | |
|
6491 | <summary> | |
|
6492 | Construct given the name of a culture | |
|
6493 | </summary> | |
|
6494 | <param name="culture"></param> | |
|
6495 | </member> | |
|
6496 | <member name="T:NUnit.Framework.SetUpAttribute"> | |
|
6497 | <summary> | |
|
6498 | SetUpAttribute is used in a TestFixture to identify a method | |
|
6499 | that is called immediately before each test is run. It is | |
|
6500 | also used in a SetUpFixture to identify the method that is | |
|
6501 | called once, before any of the subordinate tests are run. | |
|
6502 | </summary> | |
|
6503 | </member> | |
|
6504 | <member name="T:NUnit.Framework.SetUpFixtureAttribute"> | |
|
6505 | <summary> | |
|
6506 | Attribute used to mark a class that contains one-time SetUp | |
|
6507 | and/or TearDown methods that apply to all the tests in a | |
|
6508 | namespace or an assembly. | |
|
6509 | </summary> | |
|
6510 | </member> | |
|
6511 | <member name="T:NUnit.Framework.SuiteAttribute"> | |
|
6512 | <summary> | |
|
6513 | Attribute used to mark a static (shared in VB) property | |
|
6514 | that returns a list of tests. | |
|
6515 | </summary> | |
|
6516 | </member> | |
|
6517 | <member name="T:NUnit.Framework.TearDownAttribute"> | |
|
6518 | <summary> | |
|
6519 | Attribute used in a TestFixture to identify a method that is | |
|
6520 | called immediately after each test is run. It is also used | |
|
6521 | in a SetUpFixture to identify the method that is called once, | |
|
6522 | after all subordinate tests have run. In either case, the method | |
|
6523 | is guaranteed to be called, even if an exception is thrown. | |
|
6524 | </summary> | |
|
6525 | </member> | |
|
6526 | <member name="T:NUnit.Framework.TestActionAttribute"> | |
|
6527 | <summary> | |
|
6528 | Provide actions to execute before and after tests. | |
|
6529 | </summary> | |
|
6530 | </member> | |
|
6531 | <member name="T:NUnit.Framework.ITestAction"> | |
|
6532 | <summary> | |
|
6533 | When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. | |
|
6534 | </summary> | |
|
6535 | </member> | |
|
6536 | <member name="M:NUnit.Framework.ITestAction.BeforeTest(NUnit.Framework.TestDetails)"> | |
|
6537 | <summary> | |
|
6538 | Executed before each test is run | |
|
6539 | </summary> | |
|
6540 | <param name="testDetails">Provides details about the test that is going to be run.</param> | |
|
6541 | </member> | |
|
6542 | <member name="M:NUnit.Framework.ITestAction.AfterTest(NUnit.Framework.TestDetails)"> | |
|
6543 | <summary> | |
|
6544 | Executed after each test is run | |
|
6545 | </summary> | |
|
6546 | <param name="testDetails">Provides details about the test that has just been run.</param> | |
|
6547 | </member> | |
|
6548 | <member name="P:NUnit.Framework.ITestAction.Targets"> | |
|
6549 | <summary> | |
|
6550 | Provides the target for the action attribute | |
|
6551 | </summary> | |
|
6552 | <returns>The target for the action attribute</returns> | |
|
6553 | </member> | |
|
6554 | <member name="M:NUnit.Framework.TestActionAttribute.BeforeTest(NUnit.Framework.TestDetails)"> | |
|
6555 | <summary> | |
|
6556 | Method called before each test | |
|
6557 | </summary> | |
|
6558 | <param name="testDetails">Info about the test to be run</param> | |
|
6559 | </member> | |
|
6560 | <member name="M:NUnit.Framework.TestActionAttribute.AfterTest(NUnit.Framework.TestDetails)"> | |
|
6561 | <summary> | |
|
6562 | Method called after each test | |
|
6563 | </summary> | |
|
6564 | <param name="testDetails">Info about the test that was just run</param> | |
|
6565 | </member> | |
|
6566 | <member name="P:NUnit.Framework.TestActionAttribute.Targets"> | |
|
6567 | <summary> | |
|
6568 | Gets or sets the ActionTargets for this attribute | |
|
6569 | </summary> | |
|
6570 | </member> | |
|
6571 | <member name="T:NUnit.Framework.TestAttribute"> | |
|
6572 | <summary> | |
|
6573 | Adding this attribute to a method within a <seealso cref="T:NUnit.Framework.TestFixtureAttribute"/> | |
|
6574 | class makes the method callable from the NUnit test runner. There is a property | |
|
6575 | called Description which is optional which you can provide a more detailed test | |
|
6576 | description. This class cannot be inherited. | |
|
6577 | </summary> | |
|
6578 | ||
|
6579 | <example> | |
|
6580 | [TestFixture] | |
|
6581 | public class Fixture | |
|
6582 | { | |
|
6583 | [Test] | |
|
6584 | public void MethodToTest() | |
|
6585 | {} | |
|
6586 | ||
|
6587 | [Test(Description = "more detailed description")] | |
|
6588 | publc void TestDescriptionMethod() | |
|
6589 | {} | |
|
6590 | } | |
|
6591 | </example> | |
|
6592 | ||
|
6593 | </member> | |
|
6594 | <member name="P:NUnit.Framework.TestAttribute.Description"> | |
|
6595 | <summary> | |
|
6596 | Descriptive text for this test | |
|
6597 | </summary> | |
|
6598 | </member> | |
|
6599 | <member name="T:NUnit.Framework.TestCaseAttribute"> | |
|
6600 | <summary> | |
|
6601 | TestCaseAttribute is used to mark parameterized test cases | |
|
6602 | and provide them with their arguments. | |
|
6603 | </summary> | |
|
6604 | </member> | |
|
6605 | <member name="M:NUnit.Framework.TestCaseAttribute.#ctor(System.Object[])"> | |
|
6606 | <summary> | |
|
6607 | Construct a TestCaseAttribute with a list of arguments. | |
|
6608 | This constructor is not CLS-Compliant | |
|
6609 | </summary> | |
|
6610 | <param name="arguments"></param> | |
|
6611 | </member> | |
|
6612 | <member name="M:NUnit.Framework.TestCaseAttribute.#ctor(System.Object)"> | |
|
6613 | <summary> | |
|
6614 | Construct a TestCaseAttribute with a single argument | |
|
6615 | </summary> | |
|
6616 | <param name="arg"></param> | |
|
6617 | </member> | |
|
6618 | <member name="M:NUnit.Framework.TestCaseAttribute.#ctor(System.Object,System.Object)"> | |
|
6619 | <summary> | |
|
6620 | Construct a TestCaseAttribute with a two arguments | |
|
6621 | </summary> | |
|
6622 | <param name="arg1"></param> | |
|
6623 | <param name="arg2"></param> | |
|
6624 | </member> | |
|
6625 | <member name="M:NUnit.Framework.TestCaseAttribute.#ctor(System.Object,System.Object,System.Object)"> | |
|
6626 | <summary> | |
|
6627 | Construct a TestCaseAttribute with a three arguments | |
|
6628 | </summary> | |
|
6629 | <param name="arg1"></param> | |
|
6630 | <param name="arg2"></param> | |
|
6631 | <param name="arg3"></param> | |
|
6632 | </member> | |
|
6633 | <member name="P:NUnit.Framework.TestCaseAttribute.Arguments"> | |
|
6634 | <summary> | |
|
6635 | Gets the list of arguments to a test case | |
|
6636 | </summary> | |
|
6637 | </member> | |
|
6638 | <member name="P:NUnit.Framework.TestCaseAttribute.Result"> | |
|
6639 | <summary> | |
|
6640 | Gets or sets the expected result. Use | |
|
6641 | ExpectedResult by preference. | |
|
6642 | </summary> | |
|
6643 | <value>The result.</value> | |
|
6644 | </member> | |
|
6645 | <member name="P:NUnit.Framework.TestCaseAttribute.ExpectedResult"> | |
|
6646 | <summary> | |
|
6647 | Gets or sets the expected result. | |
|
6648 | </summary> | |
|
6649 | <value>The result.</value> | |
|
6650 | </member> | |
|
6651 | <member name="P:NUnit.Framework.TestCaseAttribute.HasExpectedResult"> | |
|
6652 | <summary> | |
|
6653 | Gets a flag indicating whether an expected | |
|
6654 | result has been set. | |
|
6655 | </summary> | |
|
6656 | </member> | |
|
6657 | <member name="P:NUnit.Framework.TestCaseAttribute.Categories"> | |
|
6658 | <summary> | |
|
6659 | Gets a list of categories associated with this test; | |
|
6660 | </summary> | |
|
6661 | </member> | |
|
6662 | <member name="P:NUnit.Framework.TestCaseAttribute.Category"> | |
|
6663 | <summary> | |
|
6664 | Gets or sets the category associated with this test. | |
|
6665 | May be a single category or a comma-separated list. | |
|
6666 | </summary> | |
|
6667 | </member> | |
|
6668 | <member name="P:NUnit.Framework.TestCaseAttribute.ExpectedException"> | |
|
6669 | <summary> | |
|
6670 | Gets or sets the expected exception. | |
|
6671 | </summary> | |
|
6672 | <value>The expected exception.</value> | |
|
6673 | </member> | |
|
6674 | <member name="P:NUnit.Framework.TestCaseAttribute.ExpectedExceptionName"> | |
|
6675 | <summary> | |
|
6676 | Gets or sets the name the expected exception. | |
|
6677 | </summary> | |
|
6678 | <value>The expected name of the exception.</value> | |
|
6679 | </member> | |
|
6680 | <member name="P:NUnit.Framework.TestCaseAttribute.ExpectedMessage"> | |
|
6681 | <summary> | |
|
6682 | Gets or sets the expected message of the expected exception | |
|
6683 | </summary> | |
|
6684 | <value>The expected message of the exception.</value> | |
|
6685 | </member> | |
|
6686 | <member name="P:NUnit.Framework.TestCaseAttribute.MatchType"> | |
|
6687 | <summary> | |
|
6688 | Gets or sets the type of match to be performed on the expected message | |
|
6689 | </summary> | |
|
6690 | </member> | |
|
6691 | <member name="P:NUnit.Framework.TestCaseAttribute.Description"> | |
|
6692 | <summary> | |
|
6693 | Gets or sets the description. | |
|
6694 | </summary> | |
|
6695 | <value>The description.</value> | |
|
6696 | </member> | |
|
6697 | <member name="P:NUnit.Framework.TestCaseAttribute.TestName"> | |
|
6698 | <summary> | |
|
6699 | Gets or sets the name of the test. | |
|
6700 | </summary> | |
|
6701 | <value>The name of the test.</value> | |
|
6702 | </member> | |
|
6703 | <member name="P:NUnit.Framework.TestCaseAttribute.Ignore"> | |
|
6704 | <summary> | |
|
6705 | Gets or sets the ignored status of the test | |
|
6706 | </summary> | |
|
6707 | </member> | |
|
6708 | <member name="P:NUnit.Framework.TestCaseAttribute.Ignored"> | |
|
6709 | <summary> | |
|
6710 | Gets or sets the ignored status of the test | |
|
6711 | </summary> | |
|
6712 | </member> | |
|
6713 | <member name="P:NUnit.Framework.TestCaseAttribute.Explicit"> | |
|
6714 | <summary> | |
|
6715 | Gets or sets the explicit status of the test | |
|
6716 | </summary> | |
|
6717 | </member> | |
|
6718 | <member name="P:NUnit.Framework.TestCaseAttribute.Reason"> | |
|
6719 | <summary> | |
|
6720 | Gets or sets the reason for not running the test | |
|
6721 | </summary> | |
|
6722 | </member> | |
|
6723 | <member name="P:NUnit.Framework.TestCaseAttribute.IgnoreReason"> | |
|
6724 | <summary> | |
|
6725 | Gets or sets the reason for not running the test. | |
|
6726 | Set has the side effect of marking the test as ignored. | |
|
6727 | </summary> | |
|
6728 | <value>The ignore reason.</value> | |
|
6729 | </member> | |
|
6730 | <member name="T:NUnit.Framework.TestCaseSourceAttribute"> | |
|
6731 | <summary> | |
|
6732 | FactoryAttribute indicates the source to be used to | |
|
6733 | provide test cases for a test method. | |
|
6734 | </summary> | |
|
6735 | </member> | |
|
6736 | <member name="M:NUnit.Framework.TestCaseSourceAttribute.#ctor(System.String)"> | |
|
6737 | <summary> | |
|
6738 | Construct with the name of the data source, which must | |
|
6739 | be a property, field or method of the test class itself. | |
|
6740 | </summary> | |
|
6741 | <param name="sourceName">An array of the names of the factories that will provide data</param> | |
|
6742 | </member> | |
|
6743 | <member name="M:NUnit.Framework.TestCaseSourceAttribute.#ctor(System.Type)"> | |
|
6744 | <summary> | |
|
6745 | Construct with a Type, which must implement IEnumerable | |
|
6746 | </summary> | |
|
6747 | <param name="sourceType">The Type that will provide data</param> | |
|
6748 | </member> | |
|
6749 | <member name="M:NUnit.Framework.TestCaseSourceAttribute.#ctor(System.Type,System.String)"> | |
|
6750 | <summary> | |
|
6751 | Construct with a Type and name. | |
|
6752 | that don't support params arrays. | |
|
6753 | </summary> | |
|
6754 | <param name="sourceType">The Type that will provide data</param> | |
|
6755 | <param name="sourceName">The name of the method, property or field that will provide data</param> | |
|
6756 | </member> | |
|
6757 | <member name="P:NUnit.Framework.TestCaseSourceAttribute.SourceName"> | |
|
6758 | <summary> | |
|
6759 | The name of a the method, property or fiend to be used as a source | |
|
6760 | </summary> | |
|
6761 | </member> | |
|
6762 | <member name="P:NUnit.Framework.TestCaseSourceAttribute.SourceType"> | |
|
6763 | <summary> | |
|
6764 | A Type to be used as a source | |
|
6765 | </summary> | |
|
6766 | </member> | |
|
6767 | <member name="P:NUnit.Framework.TestCaseSourceAttribute.Category"> | |
|
6768 | <summary> | |
|
6769 | Gets or sets the category associated with this test. | |
|
6770 | May be a single category or a comma-separated list. | |
|
6771 | </summary> | |
|
6772 | </member> | |
|
6773 | <member name="T:NUnit.Framework.TestFixtureAttribute"> | |
|
6774 | <example> | |
|
6775 | [TestFixture] | |
|
6776 | public class ExampleClass | |
|
6777 | {} | |
|
6778 | </example> | |
|
6779 | </member> | |
|
6780 | <member name="M:NUnit.Framework.TestFixtureAttribute.#ctor"> | |
|
6781 | <summary> | |
|
6782 | Default constructor | |
|
6783 | </summary> | |
|
6784 | </member> | |
|
6785 | <member name="M:NUnit.Framework.TestFixtureAttribute.#ctor(System.Object[])"> | |
|
6786 | <summary> | |
|
6787 | Construct with a object[] representing a set of arguments. | |
|
6788 | In .NET 2.0, the arguments may later be separated into | |
|
6789 | type arguments and constructor arguments. | |
|
6790 | </summary> | |
|
6791 | <param name="arguments"></param> | |
|
6792 | </member> | |
|
6793 | <member name="P:NUnit.Framework.TestFixtureAttribute.Description"> | |
|
6794 | <summary> | |
|
6795 | Descriptive text for this fixture | |
|
6796 | </summary> | |
|
6797 | </member> | |
|
6798 | <member name="P:NUnit.Framework.TestFixtureAttribute.Category"> | |
|
6799 | <summary> | |
|
6800 | Gets and sets the category for this fixture. | |
|
6801 | May be a comma-separated list of categories. | |
|
6802 | </summary> | |
|
6803 | </member> | |
|
6804 | <member name="P:NUnit.Framework.TestFixtureAttribute.Categories"> | |
|
6805 | <summary> | |
|
6806 | Gets a list of categories for this fixture | |
|
6807 | </summary> | |
|
6808 | </member> | |
|
6809 | <member name="P:NUnit.Framework.TestFixtureAttribute.Arguments"> | |
|
6810 | <summary> | |
|
6811 | The arguments originally provided to the attribute | |
|
6812 | </summary> | |
|
6813 | </member> | |
|
6814 | <member name="P:NUnit.Framework.TestFixtureAttribute.Ignore"> | |
|
6815 | <summary> | |
|
6816 | Gets or sets a value indicating whether this <see cref="T:NUnit.Framework.TestFixtureAttribute"/> should be ignored. | |
|
6817 | </summary> | |
|
6818 | <value><c>true</c> if ignore; otherwise, <c>false</c>.</value> | |
|
6819 | </member> | |
|
6820 | <member name="P:NUnit.Framework.TestFixtureAttribute.IgnoreReason"> | |
|
6821 | <summary> | |
|
6822 | Gets or sets the ignore reason. May set Ignored as a side effect. | |
|
6823 | </summary> | |
|
6824 | <value>The ignore reason.</value> | |
|
6825 | </member> | |
|
6826 | <member name="P:NUnit.Framework.TestFixtureAttribute.TypeArgs"> | |
|
6827 | <summary> | |
|
6828 | Get or set the type arguments. If not set | |
|
6829 | explicitly, any leading arguments that are | |
|
6830 | Types are taken as type arguments. | |
|
6831 | </summary> | |
|
6832 | </member> | |
|
6833 | <member name="T:NUnit.Framework.TestFixtureSetUpAttribute"> | |
|
6834 | <summary> | |
|
6835 | Attribute used to identify a method that is | |
|
6836 | called before any tests in a fixture are run. | |
|
6837 | </summary> | |
|
6838 | </member> | |
|
6839 | <member name="T:NUnit.Framework.TestFixtureTearDownAttribute"> | |
|
6840 | <summary> | |
|
6841 | Attribute used to identify a method that is called after | |
|
6842 | all the tests in a fixture have run. The method is | |
|
6843 | guaranteed to be called, even if an exception is thrown. | |
|
6844 | </summary> | |
|
6845 | </member> | |
|
6846 | <member name="T:NUnit.Framework.TheoryAttribute"> | |
|
6847 | <summary> | |
|
6848 | Adding this attribute to a method within a <seealso cref="T:NUnit.Framework.TestFixtureAttribute"/> | |
|
6849 | class makes the method callable from the NUnit test runner. There is a property | |
|
6850 | called Description which is optional which you can provide a more detailed test | |
|
6851 | description. This class cannot be inherited. | |
|
6852 | </summary> | |
|
6853 | ||
|
6854 | <example> | |
|
6855 | [TestFixture] | |
|
6856 | public class Fixture | |
|
6857 | { | |
|
6858 | [Test] | |
|
6859 | public void MethodToTest() | |
|
6860 | {} | |
|
6861 | ||
|
6862 | [Test(Description = "more detailed description")] | |
|
6863 | publc void TestDescriptionMethod() | |
|
6864 | {} | |
|
6865 | } | |
|
6866 | </example> | |
|
6867 | ||
|
6868 | </member> | |
|
6869 | <member name="T:NUnit.Framework.TimeoutAttribute"> | |
|
6870 | <summary> | |
|
6871 | Used on a method, marks the test with a timeout value in milliseconds. | |
|
6872 | The test will be run in a separate thread and is cancelled if the timeout | |
|
6873 | is exceeded. Used on a method or assembly, sets the default timeout | |
|
6874 | for all contained test methods. | |
|
6875 | </summary> | |
|
6876 | </member> | |
|
6877 | <member name="M:NUnit.Framework.TimeoutAttribute.#ctor(System.Int32)"> | |
|
6878 | <summary> | |
|
6879 | Construct a TimeoutAttribute given a time in milliseconds | |
|
6880 | </summary> | |
|
6881 | <param name="timeout">The timeout value in milliseconds</param> | |
|
6882 | </member> | |
|
6883 | <member name="T:NUnit.Framework.RequiresSTAAttribute"> | |
|
6884 | <summary> | |
|
6885 | Marks a test that must run in the STA, causing it | |
|
6886 | to run in a separate thread if necessary. | |
|
6887 | ||
|
6888 | On methods, you may also use STAThreadAttribute | |
|
6889 | to serve the same purpose. | |
|
6890 | </summary> | |
|
6891 | </member> | |
|
6892 | <member name="M:NUnit.Framework.RequiresSTAAttribute.#ctor"> | |
|
6893 | <summary> | |
|
6894 | Construct a RequiresSTAAttribute | |
|
6895 | </summary> | |
|
6896 | </member> | |
|
6897 | <member name="T:NUnit.Framework.RequiresMTAAttribute"> | |
|
6898 | <summary> | |
|
6899 | Marks a test that must run in the MTA, causing it | |
|
6900 | to run in a separate thread if necessary. | |
|
6901 | ||
|
6902 | On methods, you may also use MTAThreadAttribute | |
|
6903 | to serve the same purpose. | |
|
6904 | </summary> | |
|
6905 | </member> | |
|
6906 | <member name="M:NUnit.Framework.RequiresMTAAttribute.#ctor"> | |
|
6907 | <summary> | |
|
6908 | Construct a RequiresMTAAttribute | |
|
6909 | </summary> | |
|
6910 | </member> | |
|
6911 | <member name="T:NUnit.Framework.RequiresThreadAttribute"> | |
|
6912 | <summary> | |
|
6913 | Marks a test that must run on a separate thread. | |
|
6914 | </summary> | |
|
6915 | </member> | |
|
6916 | <member name="M:NUnit.Framework.RequiresThreadAttribute.#ctor"> | |
|
6917 | <summary> | |
|
6918 | Construct a RequiresThreadAttribute | |
|
6919 | </summary> | |
|
6920 | </member> | |
|
6921 | <member name="M:NUnit.Framework.RequiresThreadAttribute.#ctor(System.Threading.ApartmentState)"> | |
|
6922 | <summary> | |
|
6923 | Construct a RequiresThreadAttribute, specifying the apartment | |
|
6924 | </summary> | |
|
6925 | </member> | |
|
6926 | <member name="T:NUnit.Framework.ValueSourceAttribute"> | |
|
6927 | <summary> | |
|
6928 | ValueSourceAttribute indicates the source to be used to | |
|
6929 | provide data for one parameter of a test method. | |
|
6930 | </summary> | |
|
6931 | </member> | |
|
6932 | <member name="M:NUnit.Framework.ValueSourceAttribute.#ctor(System.String)"> | |
|
6933 | <summary> | |
|
6934 | Construct with the name of the factory - for use with languages | |
|
6935 | that don't support params arrays. | |
|
6936 | </summary> | |
|
6937 | <param name="sourceName">The name of the data source to be used</param> | |
|
6938 | </member> | |
|
6939 | <member name="M:NUnit.Framework.ValueSourceAttribute.#ctor(System.Type,System.String)"> | |
|
6940 | <summary> | |
|
6941 | Construct with a Type and name - for use with languages | |
|
6942 | that don't support params arrays. | |
|
6943 | </summary> | |
|
6944 | <param name="sourceType">The Type that will provide data</param> | |
|
6945 | <param name="sourceName">The name of the method, property or field that will provide data</param> | |
|
6946 | </member> | |
|
6947 | <member name="P:NUnit.Framework.ValueSourceAttribute.SourceName"> | |
|
6948 | <summary> | |
|
6949 | The name of a the method, property or fiend to be used as a source | |
|
6950 | </summary> | |
|
6951 | </member> | |
|
6952 | <member name="P:NUnit.Framework.ValueSourceAttribute.SourceType"> | |
|
6953 | <summary> | |
|
6954 | A Type to be used as a source | |
|
6955 | </summary> | |
|
6956 | </member> | |
|
6957 | <member name="T:NUnit.Framework.Constraints.AllItemsConstraint"> | |
|
6958 | <summary> | |
|
6959 | AllItemsConstraint applies another constraint to each | |
|
6960 | item in a collection, succeeding if they all succeed. | |
|
6961 | </summary> | |
|
6962 | </member> | |
|
6963 | <member name="T:NUnit.Framework.Constraints.PrefixConstraint"> | |
|
6964 | <summary> | |
|
6965 | Abstract base class used for prefixes | |
|
6966 | </summary> | |
|
6967 | </member> | |
|
6968 | <member name="T:NUnit.Framework.Constraints.Constraint"> | |
|
6969 | <summary> | |
|
6970 | The Constraint class is the base of all built-in constraints | |
|
6971 | within NUnit. It provides the operator overloads used to combine | |
|
6972 | constraints. | |
|
6973 | </summary> | |
|
6974 | </member> | |
|
6975 | <member name="T:NUnit.Framework.Constraints.IResolveConstraint"> | |
|
6976 | <summary> | |
|
6977 | The IConstraintExpression interface is implemented by all | |
|
6978 | complete and resolvable constraints and expressions. | |
|
6979 | </summary> | |
|
6980 | </member> | |
|
6981 | <member name="M:NUnit.Framework.Constraints.IResolveConstraint.Resolve"> | |
|
6982 | <summary> | |
|
6983 | Return the top-level constraint for this expression | |
|
6984 | </summary> | |
|
6985 | <returns></returns> | |
|
6986 | </member> | |
|
6987 | <member name="F:NUnit.Framework.Constraints.Constraint.UNSET"> | |
|
6988 | <summary> | |
|
6989 | Static UnsetObject used to detect derived constraints | |
|
6990 | failing to set the actual value. | |
|
6991 | </summary> | |
|
6992 | </member> | |
|
6993 | <member name="F:NUnit.Framework.Constraints.Constraint.actual"> | |
|
6994 | <summary> | |
|
6995 | The actual value being tested against a constraint | |
|
6996 | </summary> | |
|
6997 | </member> | |
|
6998 | <member name="F:NUnit.Framework.Constraints.Constraint.displayName"> | |
|
6999 | <summary> | |
|
7000 | The display name of this Constraint for use by ToString() | |
|
7001 | </summary> | |
|
7002 | </member> | |
|
7003 | <member name="F:NUnit.Framework.Constraints.Constraint.argcnt"> | |
|
7004 | <summary> | |
|
7005 | Argument fields used by ToString(); | |
|
7006 | </summary> | |
|
7007 | </member> | |
|
7008 | <member name="F:NUnit.Framework.Constraints.Constraint.builder"> | |
|
7009 | <summary> | |
|
7010 | The builder holding this constraint | |
|
7011 | </summary> | |
|
7012 | </member> | |
|
7013 | <member name="M:NUnit.Framework.Constraints.Constraint.#ctor"> | |
|
7014 | <summary> | |
|
7015 | Construct a constraint with no arguments | |
|
7016 | </summary> | |
|
7017 | </member> | |
|
7018 | <member name="M:NUnit.Framework.Constraints.Constraint.#ctor(System.Object)"> | |
|
7019 | <summary> | |
|
7020 | Construct a constraint with one argument | |
|
7021 | </summary> | |
|
7022 | </member> | |
|
7023 | <member name="M:NUnit.Framework.Constraints.Constraint.#ctor(System.Object,System.Object)"> | |
|
7024 | <summary> | |
|
7025 | Construct a constraint with two arguments | |
|
7026 | </summary> | |
|
7027 | </member> | |
|
7028 | <member name="M:NUnit.Framework.Constraints.Constraint.SetBuilder(NUnit.Framework.Constraints.ConstraintBuilder)"> | |
|
7029 | <summary> | |
|
7030 | Sets the ConstraintBuilder holding this constraint | |
|
7031 | </summary> | |
|
7032 | </member> | |
|
7033 | <member name="M:NUnit.Framework.Constraints.Constraint.WriteMessageTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7034 | <summary> | |
|
7035 | Write the failure message to the MessageWriter provided | |
|
7036 | as an argument. The default implementation simply passes | |
|
7037 | the constraint and the actual value to the writer, which | |
|
7038 | then displays the constraint description and the value. | |
|
7039 | ||
|
7040 | Constraints that need to provide additional details, | |
|
7041 | such as where the error occured can override this. | |
|
7042 | </summary> | |
|
7043 | <param name="writer">The MessageWriter on which to display the message</param> | |
|
7044 | </member> | |
|
7045 | <member name="M:NUnit.Framework.Constraints.Constraint.Matches(System.Object)"> | |
|
7046 | <summary> | |
|
7047 | Test whether the constraint is satisfied by a given value | |
|
7048 | </summary> | |
|
7049 | <param name="actual">The value to be tested</param> | |
|
7050 | <returns>True for success, false for failure</returns> | |
|
7051 | </member> | |
|
7052 | <member name="M:NUnit.Framework.Constraints.Constraint.Matches``1(NUnit.Framework.Constraints.ActualValueDelegate{``0})"> | |
|
7053 | <summary> | |
|
7054 | Test whether the constraint is satisfied by an | |
|
7055 | ActualValueDelegate that returns the value to be tested. | |
|
7056 | The default implementation simply evaluates the delegate | |
|
7057 | but derived classes may override it to provide for delayed | |
|
7058 | processing. | |
|
7059 | </summary> | |
|
7060 | <param name="del">An <see cref="T:NUnit.Framework.Constraints.ActualValueDelegate`1"/></param> | |
|
7061 | <returns>True for success, false for failure</returns> | |
|
7062 | </member> | |
|
7063 | <member name="M:NUnit.Framework.Constraints.Constraint.Matches``1(``0@)"> | |
|
7064 | <summary> | |
|
7065 | Test whether the constraint is satisfied by a given reference. | |
|
7066 | The default implementation simply dereferences the value but | |
|
7067 | derived classes may override it to provide for delayed processing. | |
|
7068 | </summary> | |
|
7069 | <param name="actual">A reference to the value to be tested</param> | |
|
7070 | <returns>True for success, false for failure</returns> | |
|
7071 | </member> | |
|
7072 | <member name="M:NUnit.Framework.Constraints.Constraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7073 | <summary> | |
|
7074 | Write the constraint description to a MessageWriter | |
|
7075 | </summary> | |
|
7076 | <param name="writer">The writer on which the description is displayed</param> | |
|
7077 | </member> | |
|
7078 | <member name="M:NUnit.Framework.Constraints.Constraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7079 | <summary> | |
|
7080 | Write the actual value for a failing constraint test to a | |
|
7081 | MessageWriter. The default implementation simply writes | |
|
7082 | the raw value of actual, leaving it to the writer to | |
|
7083 | perform any formatting. | |
|
7084 | </summary> | |
|
7085 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
7086 | </member> | |
|
7087 | <member name="M:NUnit.Framework.Constraints.Constraint.ToString"> | |
|
7088 | <summary> | |
|
7089 | Default override of ToString returns the constraint DisplayName | |
|
7090 | followed by any arguments within angle brackets. | |
|
7091 | </summary> | |
|
7092 | <returns></returns> | |
|
7093 | </member> | |
|
7094 | <member name="M:NUnit.Framework.Constraints.Constraint.GetStringRepresentation"> | |
|
7095 | <summary> | |
|
7096 | Returns the string representation of this constraint | |
|
7097 | </summary> | |
|
7098 | </member> | |
|
7099 | <member name="M:NUnit.Framework.Constraints.Constraint.op_BitwiseAnd(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> | |
|
7100 | <summary> | |
|
7101 | This operator creates a constraint that is satisfied only if both | |
|
7102 | argument constraints are satisfied. | |
|
7103 | </summary> | |
|
7104 | </member> | |
|
7105 | <member name="M:NUnit.Framework.Constraints.Constraint.op_BitwiseOr(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> | |
|
7106 | <summary> | |
|
7107 | This operator creates a constraint that is satisfied if either | |
|
7108 | of the argument constraints is satisfied. | |
|
7109 | </summary> | |
|
7110 | </member> | |
|
7111 | <member name="M:NUnit.Framework.Constraints.Constraint.op_LogicalNot(NUnit.Framework.Constraints.Constraint)"> | |
|
7112 | <summary> | |
|
7113 | This operator creates a constraint that is satisfied if the | |
|
7114 | argument constraint is not satisfied. | |
|
7115 | </summary> | |
|
7116 | </member> | |
|
7117 | <member name="M:NUnit.Framework.Constraints.Constraint.After(System.Int32)"> | |
|
7118 | <summary> | |
|
7119 | Returns a DelayedConstraint with the specified delay time. | |
|
7120 | </summary> | |
|
7121 | <param name="delayInMilliseconds">The delay in milliseconds.</param> | |
|
7122 | <returns></returns> | |
|
7123 | </member> | |
|
7124 | <member name="M:NUnit.Framework.Constraints.Constraint.After(System.Int32,System.Int32)"> | |
|
7125 | <summary> | |
|
7126 | Returns a DelayedConstraint with the specified delay time | |
|
7127 | and polling interval. | |
|
7128 | </summary> | |
|
7129 | <param name="delayInMilliseconds">The delay in milliseconds.</param> | |
|
7130 | <param name="pollingInterval">The interval at which to test the constraint.</param> | |
|
7131 | <returns></returns> | |
|
7132 | </member> | |
|
7133 | <member name="P:NUnit.Framework.Constraints.Constraint.DisplayName"> | |
|
7134 | <summary> | |
|
7135 | The display name of this Constraint for use by ToString(). | |
|
7136 | The default value is the name of the constraint with | |
|
7137 | trailing "Constraint" removed. Derived classes may set | |
|
7138 | this to another name in their constructors. | |
|
7139 | </summary> | |
|
7140 | </member> | |
|
7141 | <member name="P:NUnit.Framework.Constraints.Constraint.And"> | |
|
7142 | <summary> | |
|
7143 | Returns a ConstraintExpression by appending And | |
|
7144 | to the current constraint. | |
|
7145 | </summary> | |
|
7146 | </member> | |
|
7147 | <member name="P:NUnit.Framework.Constraints.Constraint.With"> | |
|
7148 | <summary> | |
|
7149 | Returns a ConstraintExpression by appending And | |
|
7150 | to the current constraint. | |
|
7151 | </summary> | |
|
7152 | </member> | |
|
7153 | <member name="P:NUnit.Framework.Constraints.Constraint.Or"> | |
|
7154 | <summary> | |
|
7155 | Returns a ConstraintExpression by appending Or | |
|
7156 | to the current constraint. | |
|
7157 | </summary> | |
|
7158 | </member> | |
|
7159 | <member name="T:NUnit.Framework.Constraints.Constraint.UnsetObject"> | |
|
7160 | <summary> | |
|
7161 | Class used to detect any derived constraints | |
|
7162 | that fail to set the actual value in their | |
|
7163 | Matches override. | |
|
7164 | </summary> | |
|
7165 | </member> | |
|
7166 | <member name="F:NUnit.Framework.Constraints.PrefixConstraint.baseConstraint"> | |
|
7167 | <summary> | |
|
7168 | The base constraint | |
|
7169 | </summary> | |
|
7170 | </member> | |
|
7171 | <member name="M:NUnit.Framework.Constraints.PrefixConstraint.#ctor(NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
7172 | <summary> | |
|
7173 | Construct given a base constraint | |
|
7174 | </summary> | |
|
7175 | <param name="resolvable"></param> | |
|
7176 | </member> | |
|
7177 | <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> | |
|
7178 | <summary> | |
|
7179 | Construct an AllItemsConstraint on top of an existing constraint | |
|
7180 | </summary> | |
|
7181 | <param name="itemConstraint"></param> | |
|
7182 | </member> | |
|
7183 | <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.Matches(System.Object)"> | |
|
7184 | <summary> | |
|
7185 | Apply the item constraint to each item in the collection, | |
|
7186 | failing if any item fails. | |
|
7187 | </summary> | |
|
7188 | <param name="actual"></param> | |
|
7189 | <returns></returns> | |
|
7190 | </member> | |
|
7191 | <member name="M:NUnit.Framework.Constraints.AllItemsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7192 | <summary> | |
|
7193 | Write a description of this constraint to a MessageWriter | |
|
7194 | </summary> | |
|
7195 | <param name="writer"></param> | |
|
7196 | </member> | |
|
7197 | <member name="T:NUnit.Framework.Constraints.AndConstraint"> | |
|
7198 | <summary> | |
|
7199 | AndConstraint succeeds only if both members succeed. | |
|
7200 | </summary> | |
|
7201 | </member> | |
|
7202 | <member name="T:NUnit.Framework.Constraints.BinaryConstraint"> | |
|
7203 | <summary> | |
|
7204 | BinaryConstraint is the abstract base of all constraints | |
|
7205 | that combine two other constraints in some fashion. | |
|
7206 | </summary> | |
|
7207 | </member> | |
|
7208 | <member name="F:NUnit.Framework.Constraints.BinaryConstraint.left"> | |
|
7209 | <summary> | |
|
7210 | The first constraint being combined | |
|
7211 | </summary> | |
|
7212 | </member> | |
|
7213 | <member name="F:NUnit.Framework.Constraints.BinaryConstraint.right"> | |
|
7214 | <summary> | |
|
7215 | The second constraint being combined | |
|
7216 | </summary> | |
|
7217 | </member> | |
|
7218 | <member name="M:NUnit.Framework.Constraints.BinaryConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> | |
|
7219 | <summary> | |
|
7220 | Construct a BinaryConstraint from two other constraints | |
|
7221 | </summary> | |
|
7222 | <param name="left">The first constraint</param> | |
|
7223 | <param name="right">The second constraint</param> | |
|
7224 | </member> | |
|
7225 | <member name="M:NUnit.Framework.Constraints.AndConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> | |
|
7226 | <summary> | |
|
7227 | Create an AndConstraint from two other constraints | |
|
7228 | </summary> | |
|
7229 | <param name="left">The first constraint</param> | |
|
7230 | <param name="right">The second constraint</param> | |
|
7231 | </member> | |
|
7232 | <member name="M:NUnit.Framework.Constraints.AndConstraint.Matches(System.Object)"> | |
|
7233 | <summary> | |
|
7234 | Apply both member constraints to an actual value, succeeding | |
|
7235 | succeeding only if both of them succeed. | |
|
7236 | </summary> | |
|
7237 | <param name="actual">The actual value</param> | |
|
7238 | <returns>True if the constraints both succeeded</returns> | |
|
7239 | </member> | |
|
7240 | <member name="M:NUnit.Framework.Constraints.AndConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7241 | <summary> | |
|
7242 | Write a description for this contraint to a MessageWriter | |
|
7243 | </summary> | |
|
7244 | <param name="writer">The MessageWriter to receive the description</param> | |
|
7245 | </member> | |
|
7246 | <member name="M:NUnit.Framework.Constraints.AndConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7247 | <summary> | |
|
7248 | Write the actual value for a failing constraint test to a | |
|
7249 | MessageWriter. The default implementation simply writes | |
|
7250 | the raw value of actual, leaving it to the writer to | |
|
7251 | perform any formatting. | |
|
7252 | </summary> | |
|
7253 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
7254 | </member> | |
|
7255 | <member name="T:NUnit.Framework.Constraints.AssignableFromConstraint"> | |
|
7256 | <summary> | |
|
7257 | AssignableFromConstraint is used to test that an object | |
|
7258 | can be assigned from a given Type. | |
|
7259 | </summary> | |
|
7260 | </member> | |
|
7261 | <member name="T:NUnit.Framework.Constraints.TypeConstraint"> | |
|
7262 | <summary> | |
|
7263 | TypeConstraint is the abstract base for constraints | |
|
7264 | that take a Type as their expected value. | |
|
7265 | </summary> | |
|
7266 | </member> | |
|
7267 | <member name="F:NUnit.Framework.Constraints.TypeConstraint.expectedType"> | |
|
7268 | <summary> | |
|
7269 | The expected Type used by the constraint | |
|
7270 | </summary> | |
|
7271 | </member> | |
|
7272 | <member name="M:NUnit.Framework.Constraints.TypeConstraint.#ctor(System.Type)"> | |
|
7273 | <summary> | |
|
7274 | Construct a TypeConstraint for a given Type | |
|
7275 | </summary> | |
|
7276 | <param name="type"></param> | |
|
7277 | </member> | |
|
7278 | <member name="M:NUnit.Framework.Constraints.TypeConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7279 | <summary> | |
|
7280 | Write the actual value for a failing constraint test to a | |
|
7281 | MessageWriter. TypeConstraints override this method to write | |
|
7282 | the name of the type. | |
|
7283 | </summary> | |
|
7284 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
7285 | </member> | |
|
7286 | <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.#ctor(System.Type)"> | |
|
7287 | <summary> | |
|
7288 | Construct an AssignableFromConstraint for the type provided | |
|
7289 | </summary> | |
|
7290 | <param name="type"></param> | |
|
7291 | </member> | |
|
7292 | <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.Matches(System.Object)"> | |
|
7293 | <summary> | |
|
7294 | Test whether an object can be assigned from the specified type | |
|
7295 | </summary> | |
|
7296 | <param name="actual">The object to be tested</param> | |
|
7297 | <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns> | |
|
7298 | </member> | |
|
7299 | <member name="M:NUnit.Framework.Constraints.AssignableFromConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7300 | <summary> | |
|
7301 | Write a description of this constraint to a MessageWriter | |
|
7302 | </summary> | |
|
7303 | <param name="writer">The MessageWriter to use</param> | |
|
7304 | </member> | |
|
7305 | <member name="T:NUnit.Framework.Constraints.AssignableToConstraint"> | |
|
7306 | <summary> | |
|
7307 | AssignableToConstraint is used to test that an object | |
|
7308 | can be assigned to a given Type. | |
|
7309 | </summary> | |
|
7310 | </member> | |
|
7311 | <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.#ctor(System.Type)"> | |
|
7312 | <summary> | |
|
7313 | Construct an AssignableToConstraint for the type provided | |
|
7314 | </summary> | |
|
7315 | <param name="type"></param> | |
|
7316 | </member> | |
|
7317 | <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.Matches(System.Object)"> | |
|
7318 | <summary> | |
|
7319 | Test whether an object can be assigned to the specified type | |
|
7320 | </summary> | |
|
7321 | <param name="actual">The object to be tested</param> | |
|
7322 | <returns>True if the object can be assigned a value of the expected Type, otherwise false.</returns> | |
|
7323 | </member> | |
|
7324 | <member name="M:NUnit.Framework.Constraints.AssignableToConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7325 | <summary> | |
|
7326 | Write a description of this constraint to a MessageWriter | |
|
7327 | </summary> | |
|
7328 | <param name="writer">The MessageWriter to use</param> | |
|
7329 | </member> | |
|
7330 | <member name="T:NUnit.Framework.Constraints.AttributeConstraint"> | |
|
7331 | <summary> | |
|
7332 | AttributeConstraint tests that a specified attribute is present | |
|
7333 | on a Type or other provider and that the value of the attribute | |
|
7334 | satisfies some other constraint. | |
|
7335 | </summary> | |
|
7336 | </member> | |
|
7337 | <member name="M:NUnit.Framework.Constraints.AttributeConstraint.#ctor(System.Type,NUnit.Framework.Constraints.Constraint)"> | |
|
7338 | <summary> | |
|
7339 | Constructs an AttributeConstraint for a specified attriute | |
|
7340 | Type and base constraint. | |
|
7341 | </summary> | |
|
7342 | <param name="type"></param> | |
|
7343 | <param name="baseConstraint"></param> | |
|
7344 | </member> | |
|
7345 | <member name="M:NUnit.Framework.Constraints.AttributeConstraint.Matches(System.Object)"> | |
|
7346 | <summary> | |
|
7347 | Determines whether the Type or other provider has the | |
|
7348 | expected attribute and if its value matches the | |
|
7349 | additional constraint specified. | |
|
7350 | </summary> | |
|
7351 | </member> | |
|
7352 | <member name="M:NUnit.Framework.Constraints.AttributeConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7353 | <summary> | |
|
7354 | Writes a description of the attribute to the specified writer. | |
|
7355 | </summary> | |
|
7356 | </member> | |
|
7357 | <member name="M:NUnit.Framework.Constraints.AttributeConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7358 | <summary> | |
|
7359 | Writes the actual value supplied to the specified writer. | |
|
7360 | </summary> | |
|
7361 | </member> | |
|
7362 | <member name="M:NUnit.Framework.Constraints.AttributeConstraint.GetStringRepresentation"> | |
|
7363 | <summary> | |
|
7364 | Returns a string representation of the constraint. | |
|
7365 | </summary> | |
|
7366 | </member> | |
|
7367 | <member name="T:NUnit.Framework.Constraints.AttributeExistsConstraint"> | |
|
7368 | <summary> | |
|
7369 | AttributeExistsConstraint tests for the presence of a | |
|
7370 | specified attribute on a Type. | |
|
7371 | </summary> | |
|
7372 | </member> | |
|
7373 | <member name="M:NUnit.Framework.Constraints.AttributeExistsConstraint.#ctor(System.Type)"> | |
|
7374 | <summary> | |
|
7375 | Constructs an AttributeExistsConstraint for a specific attribute Type | |
|
7376 | </summary> | |
|
7377 | <param name="type"></param> | |
|
7378 | </member> | |
|
7379 | <member name="M:NUnit.Framework.Constraints.AttributeExistsConstraint.Matches(System.Object)"> | |
|
7380 | <summary> | |
|
7381 | Tests whether the object provides the expected attribute. | |
|
7382 | </summary> | |
|
7383 | <param name="actual">A Type, MethodInfo, or other ICustomAttributeProvider</param> | |
|
7384 | <returns>True if the expected attribute is present, otherwise false</returns> | |
|
7385 | </member> | |
|
7386 | <member name="M:NUnit.Framework.Constraints.AttributeExistsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7387 | <summary> | |
|
7388 | Writes the description of the constraint to the specified writer | |
|
7389 | </summary> | |
|
7390 | </member> | |
|
7391 | <member name="T:NUnit.Framework.Constraints.BasicConstraint"> | |
|
7392 | <summary> | |
|
7393 | BasicConstraint is the abstract base for constraints that | |
|
7394 | perform a simple comparison to a constant value. | |
|
7395 | </summary> | |
|
7396 | </member> | |
|
7397 | <member name="M:NUnit.Framework.Constraints.BasicConstraint.#ctor(System.Object,System.String)"> | |
|
7398 | <summary> | |
|
7399 | Initializes a new instance of the <see cref="T:BasicConstraint"/> class. | |
|
7400 | </summary> | |
|
7401 | <param name="expected">The expected.</param> | |
|
7402 | <param name="description">The description.</param> | |
|
7403 | </member> | |
|
7404 | <member name="M:NUnit.Framework.Constraints.BasicConstraint.Matches(System.Object)"> | |
|
7405 | <summary> | |
|
7406 | Test whether the constraint is satisfied by a given value | |
|
7407 | </summary> | |
|
7408 | <param name="actual">The value to be tested</param> | |
|
7409 | <returns>True for success, false for failure</returns> | |
|
7410 | </member> | |
|
7411 | <member name="M:NUnit.Framework.Constraints.BasicConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7412 | <summary> | |
|
7413 | Write the constraint description to a MessageWriter | |
|
7414 | </summary> | |
|
7415 | <param name="writer">The writer on which the description is displayed</param> | |
|
7416 | </member> | |
|
7417 | <member name="T:NUnit.Framework.Constraints.BinarySerializableConstraint"> | |
|
7418 | <summary> | |
|
7419 | BinarySerializableConstraint tests whether | |
|
7420 | an object is serializable in binary format. | |
|
7421 | </summary> | |
|
7422 | </member> | |
|
7423 | <member name="M:NUnit.Framework.Constraints.BinarySerializableConstraint.Matches(System.Object)"> | |
|
7424 | <summary> | |
|
7425 | Test whether the constraint is satisfied by a given value | |
|
7426 | </summary> | |
|
7427 | <param name="actual">The value to be tested</param> | |
|
7428 | <returns>True for success, false for failure</returns> | |
|
7429 | </member> | |
|
7430 | <member name="M:NUnit.Framework.Constraints.BinarySerializableConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7431 | <summary> | |
|
7432 | Write the constraint description to a MessageWriter | |
|
7433 | </summary> | |
|
7434 | <param name="writer">The writer on which the description is displayed</param> | |
|
7435 | </member> | |
|
7436 | <member name="M:NUnit.Framework.Constraints.BinarySerializableConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7437 | <summary> | |
|
7438 | Write the actual value for a failing constraint test to a | |
|
7439 | MessageWriter. The default implementation simply writes | |
|
7440 | the raw value of actual, leaving it to the writer to | |
|
7441 | perform any formatting. | |
|
7442 | </summary> | |
|
7443 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
7444 | </member> | |
|
7445 | <member name="M:NUnit.Framework.Constraints.BinarySerializableConstraint.GetStringRepresentation"> | |
|
7446 | <summary> | |
|
7447 | Returns the string representation | |
|
7448 | </summary> | |
|
7449 | </member> | |
|
7450 | <member name="T:NUnit.Framework.Constraints.CollectionConstraint"> | |
|
7451 | <summary> | |
|
7452 | CollectionConstraint is the abstract base class for | |
|
7453 | constraints that operate on collections. | |
|
7454 | </summary> | |
|
7455 | </member> | |
|
7456 | <member name="M:NUnit.Framework.Constraints.CollectionConstraint.#ctor"> | |
|
7457 | <summary> | |
|
7458 | Construct an empty CollectionConstraint | |
|
7459 | </summary> | |
|
7460 | </member> | |
|
7461 | <member name="M:NUnit.Framework.Constraints.CollectionConstraint.#ctor(System.Object)"> | |
|
7462 | <summary> | |
|
7463 | Construct a CollectionConstraint | |
|
7464 | </summary> | |
|
7465 | <param name="arg"></param> | |
|
7466 | </member> | |
|
7467 | <member name="M:NUnit.Framework.Constraints.CollectionConstraint.IsEmpty(System.Collections.IEnumerable)"> | |
|
7468 | <summary> | |
|
7469 | Determines whether the specified enumerable is empty. | |
|
7470 | </summary> | |
|
7471 | <param name="enumerable">The enumerable.</param> | |
|
7472 | <returns> | |
|
7473 | <c>true</c> if the specified enumerable is empty; otherwise, <c>false</c>. | |
|
7474 | </returns> | |
|
7475 | </member> | |
|
7476 | <member name="M:NUnit.Framework.Constraints.CollectionConstraint.Matches(System.Object)"> | |
|
7477 | <summary> | |
|
7478 | Test whether the constraint is satisfied by a given value | |
|
7479 | </summary> | |
|
7480 | <param name="actual">The value to be tested</param> | |
|
7481 | <returns>True for success, false for failure</returns> | |
|
7482 | </member> | |
|
7483 | <member name="M:NUnit.Framework.Constraints.CollectionConstraint.doMatch(System.Collections.IEnumerable)"> | |
|
7484 | <summary> | |
|
7485 | Protected method to be implemented by derived classes | |
|
7486 | </summary> | |
|
7487 | <param name="collection"></param> | |
|
7488 | <returns></returns> | |
|
7489 | </member> | |
|
7490 | <member name="T:NUnit.Framework.Constraints.CollectionContainsConstraint"> | |
|
7491 | <summary> | |
|
7492 | CollectionContainsConstraint is used to test whether a collection | |
|
7493 | contains an expected object as a member. | |
|
7494 | </summary> | |
|
7495 | </member> | |
|
7496 | <member name="T:NUnit.Framework.Constraints.CollectionItemsEqualConstraint"> | |
|
7497 | <summary> | |
|
7498 | CollectionItemsEqualConstraint is the abstract base class for all | |
|
7499 | collection constraints that apply some notion of item equality | |
|
7500 | as a part of their operation. | |
|
7501 | </summary> | |
|
7502 | </member> | |
|
7503 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.#ctor"> | |
|
7504 | <summary> | |
|
7505 | Construct an empty CollectionConstraint | |
|
7506 | </summary> | |
|
7507 | </member> | |
|
7508 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.#ctor(System.Object)"> | |
|
7509 | <summary> | |
|
7510 | Construct a CollectionConstraint | |
|
7511 | </summary> | |
|
7512 | <param name="arg"></param> | |
|
7513 | </member> | |
|
7514 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using(NUnit.Framework.Constraints.EqualityAdapter)"> | |
|
7515 | <summary> | |
|
7516 | Flag the constraint to use the supplied EqualityAdapter. | |
|
7517 | NOTE: For internal use only. | |
|
7518 | </summary> | |
|
7519 | <param name="adapter">The EqualityAdapter to use.</param> | |
|
7520 | <returns>Self.</returns> | |
|
7521 | </member> | |
|
7522 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using(System.Collections.IComparer)"> | |
|
7523 | <summary> | |
|
7524 | Flag the constraint to use the supplied IComparer object. | |
|
7525 | </summary> | |
|
7526 | <param name="comparer">The IComparer object to use.</param> | |
|
7527 | <returns>Self.</returns> | |
|
7528 | </member> | |
|
7529 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> | |
|
7530 | <summary> | |
|
7531 | Flag the constraint to use the supplied IComparer object. | |
|
7532 | </summary> | |
|
7533 | <param name="comparer">The IComparer object to use.</param> | |
|
7534 | <returns>Self.</returns> | |
|
7535 | </member> | |
|
7536 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Comparison{``0})"> | |
|
7537 | <summary> | |
|
7538 | Flag the constraint to use the supplied Comparison object. | |
|
7539 | </summary> | |
|
7540 | <param name="comparer">The IComparer object to use.</param> | |
|
7541 | <returns>Self.</returns> | |
|
7542 | </member> | |
|
7543 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using(System.Collections.IEqualityComparer)"> | |
|
7544 | <summary> | |
|
7545 | Flag the constraint to use the supplied IEqualityComparer object. | |
|
7546 | </summary> | |
|
7547 | <param name="comparer">The IComparer object to use.</param> | |
|
7548 | <returns>Self.</returns> | |
|
7549 | </member> | |
|
7550 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Using``1(System.Collections.Generic.IEqualityComparer{``0})"> | |
|
7551 | <summary> | |
|
7552 | Flag the constraint to use the supplied IEqualityComparer object. | |
|
7553 | </summary> | |
|
7554 | <param name="comparer">The IComparer object to use.</param> | |
|
7555 | <returns>Self.</returns> | |
|
7556 | </member> | |
|
7557 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.ItemsEqual(System.Object,System.Object)"> | |
|
7558 | <summary> | |
|
7559 | Compares two collection members for equality | |
|
7560 | </summary> | |
|
7561 | </member> | |
|
7562 | <member name="M:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.Tally(System.Collections.IEnumerable)"> | |
|
7563 | <summary> | |
|
7564 | Return a new CollectionTally for use in making tests | |
|
7565 | </summary> | |
|
7566 | <param name="c">The collection to be included in the tally</param> | |
|
7567 | </member> | |
|
7568 | <member name="P:NUnit.Framework.Constraints.CollectionItemsEqualConstraint.IgnoreCase"> | |
|
7569 | <summary> | |
|
7570 | Flag the constraint to ignore case and return self. | |
|
7571 | </summary> | |
|
7572 | </member> | |
|
7573 | <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.#ctor(System.Object)"> | |
|
7574 | <summary> | |
|
7575 | Construct a CollectionContainsConstraint | |
|
7576 | </summary> | |
|
7577 | <param name="expected"></param> | |
|
7578 | </member> | |
|
7579 | <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.doMatch(System.Collections.IEnumerable)"> | |
|
7580 | <summary> | |
|
7581 | Test whether the expected item is contained in the collection | |
|
7582 | </summary> | |
|
7583 | <param name="actual"></param> | |
|
7584 | <returns></returns> | |
|
7585 | </member> | |
|
7586 | <member name="M:NUnit.Framework.Constraints.CollectionContainsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7587 | <summary> | |
|
7588 | Write a descripton of the constraint to a MessageWriter | |
|
7589 | </summary> | |
|
7590 | <param name="writer"></param> | |
|
7591 | </member> | |
|
7592 | <member name="T:NUnit.Framework.Constraints.CollectionEquivalentConstraint"> | |
|
7593 | <summary> | |
|
7594 | CollectionEquivalentCOnstraint is used to determine whether two | |
|
7595 | collections are equivalent. | |
|
7596 | </summary> | |
|
7597 | </member> | |
|
7598 | <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.#ctor(System.Collections.IEnumerable)"> | |
|
7599 | <summary> | |
|
7600 | Construct a CollectionEquivalentConstraint | |
|
7601 | </summary> | |
|
7602 | <param name="expected"></param> | |
|
7603 | </member> | |
|
7604 | <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.doMatch(System.Collections.IEnumerable)"> | |
|
7605 | <summary> | |
|
7606 | Test whether two collections are equivalent | |
|
7607 | </summary> | |
|
7608 | <param name="actual"></param> | |
|
7609 | <returns></returns> | |
|
7610 | </member> | |
|
7611 | <member name="M:NUnit.Framework.Constraints.CollectionEquivalentConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7612 | <summary> | |
|
7613 | Write a description of this constraint to a MessageWriter | |
|
7614 | </summary> | |
|
7615 | <param name="writer"></param> | |
|
7616 | </member> | |
|
7617 | <member name="T:NUnit.Framework.Constraints.CollectionOrderedConstraint"> | |
|
7618 | <summary> | |
|
7619 | CollectionOrderedConstraint is used to test whether a collection is ordered. | |
|
7620 | </summary> | |
|
7621 | </member> | |
|
7622 | <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.#ctor"> | |
|
7623 | <summary> | |
|
7624 | Construct a CollectionOrderedConstraint | |
|
7625 | </summary> | |
|
7626 | </member> | |
|
7627 | <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using(System.Collections.IComparer)"> | |
|
7628 | <summary> | |
|
7629 | Modifies the constraint to use an IComparer and returns self. | |
|
7630 | </summary> | |
|
7631 | </member> | |
|
7632 | <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> | |
|
7633 | <summary> | |
|
7634 | Modifies the constraint to use an IComparer<T> and returns self. | |
|
7635 | </summary> | |
|
7636 | </member> | |
|
7637 | <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.Using``1(System.Comparison{``0})"> | |
|
7638 | <summary> | |
|
7639 | Modifies the constraint to use a Comparison<T> and returns self. | |
|
7640 | </summary> | |
|
7641 | </member> | |
|
7642 | <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.By(System.String)"> | |
|
7643 | <summary> | |
|
7644 | Modifies the constraint to test ordering by the value of | |
|
7645 | a specified property and returns self. | |
|
7646 | </summary> | |
|
7647 | </member> | |
|
7648 | <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.doMatch(System.Collections.IEnumerable)"> | |
|
7649 | <summary> | |
|
7650 | Test whether the collection is ordered | |
|
7651 | </summary> | |
|
7652 | <param name="actual"></param> | |
|
7653 | <returns></returns> | |
|
7654 | </member> | |
|
7655 | <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7656 | <summary> | |
|
7657 | Write a description of the constraint to a MessageWriter | |
|
7658 | </summary> | |
|
7659 | <param name="writer"></param> | |
|
7660 | </member> | |
|
7661 | <member name="M:NUnit.Framework.Constraints.CollectionOrderedConstraint.GetStringRepresentation"> | |
|
7662 | <summary> | |
|
7663 | Returns the string representation of the constraint. | |
|
7664 | </summary> | |
|
7665 | <returns></returns> | |
|
7666 | </member> | |
|
7667 | <member name="P:NUnit.Framework.Constraints.CollectionOrderedConstraint.Descending"> | |
|
7668 | <summary> | |
|
7669 | If used performs a reverse comparison | |
|
7670 | </summary> | |
|
7671 | </member> | |
|
7672 | <member name="T:NUnit.Framework.Constraints.CollectionSubsetConstraint"> | |
|
7673 | <summary> | |
|
7674 | CollectionSubsetConstraint is used to determine whether | |
|
7675 | one collection is a subset of another | |
|
7676 | </summary> | |
|
7677 | </member> | |
|
7678 | <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.#ctor(System.Collections.IEnumerable)"> | |
|
7679 | <summary> | |
|
7680 | Construct a CollectionSubsetConstraint | |
|
7681 | </summary> | |
|
7682 | <param name="expected">The collection that the actual value is expected to be a subset of</param> | |
|
7683 | </member> | |
|
7684 | <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.doMatch(System.Collections.IEnumerable)"> | |
|
7685 | <summary> | |
|
7686 | Test whether the actual collection is a subset of | |
|
7687 | the expected collection provided. | |
|
7688 | </summary> | |
|
7689 | <param name="actual"></param> | |
|
7690 | <returns></returns> | |
|
7691 | </member> | |
|
7692 | <member name="M:NUnit.Framework.Constraints.CollectionSubsetConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
7693 | <summary> | |
|
7694 | Write a description of this constraint to a MessageWriter | |
|
7695 | </summary> | |
|
7696 | <param name="writer"></param> | |
|
7697 | </member> | |
|
7698 | <member name="T:NUnit.Framework.Constraints.CollectionTally"> | |
|
7699 | <summary> | |
|
7700 | CollectionTally counts (tallies) the number of | |
|
7701 | occurences of each object in one or more enumerations. | |
|
7702 | </summary> | |
|
7703 | </member> | |
|
7704 | <member name="M:NUnit.Framework.Constraints.CollectionTally.#ctor(NUnit.Framework.Constraints.NUnitEqualityComparer,System.Collections.IEnumerable)"> | |
|
7705 | <summary> | |
|
7706 | Construct a CollectionTally object from a comparer and a collection | |
|
7707 | </summary> | |
|
7708 | </member> | |
|
7709 | <member name="M:NUnit.Framework.Constraints.CollectionTally.TryRemove(System.Object)"> | |
|
7710 | <summary> | |
|
7711 | Try to remove an object from the tally | |
|
7712 | </summary> | |
|
7713 | <param name="o">The object to remove</param> | |
|
7714 | <returns>True if successful, false if the object was not found</returns> | |
|
7715 | </member> | |
|
7716 | <member name="M:NUnit.Framework.Constraints.CollectionTally.TryRemove(System.Collections.IEnumerable)"> | |
|
7717 | <summary> | |
|
7718 | Try to remove a set of objects from the tally | |
|
7719 | </summary> | |
|
7720 | <param name="c">The objects to remove</param> | |
|
7721 | <returns>True if successful, false if any object was not found</returns> | |
|
7722 | </member> | |
|
7723 | <member name="P:NUnit.Framework.Constraints.CollectionTally.Count"> | |
|
7724 | <summary> | |
|
7725 | The number of objects remaining in the tally | |
|
7726 | </summary> | |
|
7727 | </member> | |
|
7728 | <member name="T:NUnit.Framework.Constraints.ComparisonAdapter"> | |
|
7729 | <summary> | |
|
7730 | ComparisonAdapter class centralizes all comparisons of | |
|
7731 | values in NUnit, adapting to the use of any provided | |
|
7732 | IComparer, IComparer<T> or Comparison<T> | |
|
7733 | </summary> | |
|
7734 | </member> | |
|
7735 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.For(System.Collections.IComparer)"> | |
|
7736 | <summary> | |
|
7737 | Returns a ComparisonAdapter that wraps an IComparer | |
|
7738 | </summary> | |
|
7739 | </member> | |
|
7740 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.For``1(System.Collections.Generic.IComparer{``0})"> | |
|
7741 | <summary> | |
|
7742 | Returns a ComparisonAdapter that wraps an IComparer<T> | |
|
7743 | </summary> | |
|
7744 | </member> | |
|
7745 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.For``1(System.Comparison{``0})"> | |
|
7746 | <summary> | |
|
7747 | Returns a ComparisonAdapter that wraps a Comparison<T> | |
|
7748 | </summary> | |
|
7749 | </member> | |
|
7750 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.Compare(System.Object,System.Object)"> | |
|
7751 | <summary> | |
|
7752 | Compares two objects | |
|
7753 | </summary> | |
|
7754 | </member> | |
|
7755 | <member name="P:NUnit.Framework.Constraints.ComparisonAdapter.Default"> | |
|
7756 | <summary> | |
|
7757 | Gets the default ComparisonAdapter, which wraps an | |
|
7758 | NUnitComparer object. | |
|
7759 | </summary> | |
|
7760 | </member> | |
|
7761 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.ComparerAdapter.#ctor(System.Collections.IComparer)"> | |
|
7762 | <summary> | |
|
7763 | Construct a ComparisonAdapter for an IComparer | |
|
7764 | </summary> | |
|
7765 | </member> | |
|
7766 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.ComparerAdapter.Compare(System.Object,System.Object)"> | |
|
7767 | <summary> | |
|
7768 | Compares two objects | |
|
7769 | </summary> | |
|
7770 | <param name="expected"></param> | |
|
7771 | <param name="actual"></param> | |
|
7772 | <returns></returns> | |
|
7773 | </member> | |
|
7774 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.DefaultComparisonAdapter.#ctor"> | |
|
7775 | <summary> | |
|
7776 | Construct a default ComparisonAdapter | |
|
7777 | </summary> | |
|
7778 | </member> | |
|
7779 | <member name="T:NUnit.Framework.Constraints.ComparisonAdapter.ComparerAdapter`1"> | |
|
7780 | <summary> | |
|
7781 | ComparisonAdapter<T> extends ComparisonAdapter and | |
|
7782 | allows use of an IComparer<T> or Comparison<T> | |
|
7783 | to actually perform the comparison. | |
|
7784 | </summary> | |
|
7785 | </member> | |
|
7786 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.ComparerAdapter`1.#ctor(System.Collections.Generic.IComparer{`0})"> | |
|
7787 | <summary> | |
|
7788 | Construct a ComparisonAdapter for an IComparer<T> | |
|
7789 | </summary> | |
|
7790 | </member> | |
|
7791 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.ComparerAdapter`1.Compare(System.Object,System.Object)"> | |
|
7792 | <summary> | |
|
7793 | Compare a Type T to an object | |
|
7794 | </summary> | |
|
7795 | </member> | |
|
7796 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.ComparisonAdapterForComparison`1.#ctor(System.Comparison{`0})"> | |
|
7797 | <summary> | |
|
7798 | Construct a ComparisonAdapter for a Comparison<T> | |
|
7799 | </summary> | |
|
7800 | </member> | |
|
7801 | <member name="M:NUnit.Framework.Constraints.ComparisonAdapter.ComparisonAdapterForComparison`1.Compare(System.Object,System.Object)"> | |
|
7802 | <summary> | |
|
7803 | Compare a Type T to an object | |
|
7804 | </summary> | |
|
7805 | </member> | |
|
7806 | <member name="T:NUnit.Framework.Constraints.ComparisonConstraint"> | |
|
7807 | <summary> | |
|
7808 | Abstract base class for constraints that compare values to | |
|
7809 | determine if one is greater than, equal to or less than | |
|
7810 | the other. This class supplies the Using modifiers. | |
|
7811 | </summary> | |
|
7812 | </member> | |
|
7813 | <member name="F:NUnit.Framework.Constraints.ComparisonConstraint.comparer"> | |
|
7814 | <summary> | |
|
7815 | ComparisonAdapter to be used in making the comparison | |
|
7816 | </summary> | |
|
7817 | </member> | |
|
7818 | <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.#ctor(System.Object)"> | |
|
7819 | <summary> | |
|
7820 | Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class. | |
|
7821 | </summary> | |
|
7822 | </member> | |
|
7823 | <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.#ctor(System.Object,System.Object)"> | |
|
7824 | <summary> | |
|
7825 | Initializes a new instance of the <see cref="T:ComparisonConstraint"/> class. | |
|
7826 | </summary> | |
|
7827 | </member> | |
|
7828 | <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Using(System.Collections.IComparer)"> | |
|
7829 | <summary> | |
|
7830 | Modifies the constraint to use an IComparer and returns self | |
|
7831 | </summary> | |
|
7832 | </member> | |
|
7833 | <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> | |
|
7834 | <summary> | |
|
7835 | Modifies the constraint to use an IComparer<T> and returns self | |
|
7836 | </summary> | |
|
7837 | </member> | |
|
7838 | <member name="M:NUnit.Framework.Constraints.ComparisonConstraint.Using``1(System.Comparison{``0})"> | |
|
7839 | <summary> | |
|
7840 | Modifies the constraint to use a Comparison<T> and returns self | |
|
7841 | </summary> | |
|
7842 | </member> | |
|
7843 | <member name="T:NUnit.Framework.Constraints.ActualValueDelegate`1"> | |
|
7844 | <summary> | |
|
7845 | Delegate used to delay evaluation of the actual value | |
|
7846 | to be used in evaluating a constraint | |
|
7847 | </summary> | |
|
7848 | </member> | |
|
7849 | <member name="T:NUnit.Framework.Constraints.ConstraintBuilder"> | |
|
7850 | <summary> | |
|
7851 | ConstraintBuilder maintains the stacks that are used in | |
|
7852 | processing a ConstraintExpression. An OperatorStack | |
|
7853 | is used to hold operators that are waiting for their | |
|
7854 | operands to be reognized. a ConstraintStack holds | |
|
7855 | input constraints as well as the results of each | |
|
7856 | operator applied. | |
|
7857 | </summary> | |
|
7858 | </member> | |
|
7859 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.#ctor"> | |
|
7860 | <summary> | |
|
7861 | Initializes a new instance of the <see cref="T:ConstraintBuilder"/> class. | |
|
7862 | </summary> | |
|
7863 | </member> | |
|
7864 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Append(NUnit.Framework.Constraints.ConstraintOperator)"> | |
|
7865 | <summary> | |
|
7866 | Appends the specified operator to the expression by first | |
|
7867 | reducing the operator stack and then pushing the new | |
|
7868 | operator on the stack. | |
|
7869 | </summary> | |
|
7870 | <param name="op">The operator to push.</param> | |
|
7871 | </member> | |
|
7872 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Append(NUnit.Framework.Constraints.Constraint)"> | |
|
7873 | <summary> | |
|
7874 | Appends the specified constraint to the expresson by pushing | |
|
7875 | it on the constraint stack. | |
|
7876 | </summary> | |
|
7877 | <param name="constraint">The constraint to push.</param> | |
|
7878 | </member> | |
|
7879 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.SetTopOperatorRightContext(System.Object)"> | |
|
7880 | <summary> | |
|
7881 | Sets the top operator right context. | |
|
7882 | </summary> | |
|
7883 | <param name="rightContext">The right context.</param> | |
|
7884 | </member> | |
|
7885 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ReduceOperatorStack(System.Int32)"> | |
|
7886 | <summary> | |
|
7887 | Reduces the operator stack until the topmost item | |
|
7888 | precedence is greater than or equal to the target precedence. | |
|
7889 | </summary> | |
|
7890 | <param name="targetPrecedence">The target precedence.</param> | |
|
7891 | </member> | |
|
7892 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.Resolve"> | |
|
7893 | <summary> | |
|
7894 | Resolves this instance, returning a Constraint. If the builder | |
|
7895 | is not currently in a resolvable state, an exception is thrown. | |
|
7896 | </summary> | |
|
7897 | <returns>The resolved constraint</returns> | |
|
7898 | </member> | |
|
7899 | <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.IsResolvable"> | |
|
7900 | <summary> | |
|
7901 | Gets a value indicating whether this instance is resolvable. | |
|
7902 | </summary> | |
|
7903 | <value> | |
|
7904 | <c>true</c> if this instance is resolvable; otherwise, <c>false</c>. | |
|
7905 | </value> | |
|
7906 | </member> | |
|
7907 | <member name="T:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack"> | |
|
7908 | <summary> | |
|
7909 | OperatorStack is a type-safe stack for holding ConstraintOperators | |
|
7910 | </summary> | |
|
7911 | </member> | |
|
7912 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> | |
|
7913 | <summary> | |
|
7914 | Initializes a new instance of the <see cref="T:OperatorStack"/> class. | |
|
7915 | </summary> | |
|
7916 | <param name="builder">The builder.</param> | |
|
7917 | </member> | |
|
7918 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Push(NUnit.Framework.Constraints.ConstraintOperator)"> | |
|
7919 | <summary> | |
|
7920 | Pushes the specified operator onto the stack. | |
|
7921 | </summary> | |
|
7922 | <param name="op">The op.</param> | |
|
7923 | </member> | |
|
7924 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Pop"> | |
|
7925 | <summary> | |
|
7926 | Pops the topmost operator from the stack. | |
|
7927 | </summary> | |
|
7928 | <returns></returns> | |
|
7929 | </member> | |
|
7930 | <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Empty"> | |
|
7931 | <summary> | |
|
7932 | Gets a value indicating whether this <see cref="T:OpStack"/> is empty. | |
|
7933 | </summary> | |
|
7934 | <value><c>true</c> if empty; otherwise, <c>false</c>.</value> | |
|
7935 | </member> | |
|
7936 | <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.OperatorStack.Top"> | |
|
7937 | <summary> | |
|
7938 | Gets the topmost operator without modifying the stack. | |
|
7939 | </summary> | |
|
7940 | <value>The top.</value> | |
|
7941 | </member> | |
|
7942 | <member name="T:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack"> | |
|
7943 | <summary> | |
|
7944 | ConstraintStack is a type-safe stack for holding Constraints | |
|
7945 | </summary> | |
|
7946 | </member> | |
|
7947 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> | |
|
7948 | <summary> | |
|
7949 | Initializes a new instance of the <see cref="T:ConstraintStack"/> class. | |
|
7950 | </summary> | |
|
7951 | <param name="builder">The builder.</param> | |
|
7952 | </member> | |
|
7953 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Push(NUnit.Framework.Constraints.Constraint)"> | |
|
7954 | <summary> | |
|
7955 | Pushes the specified constraint. As a side effect, | |
|
7956 | the constraint's builder field is set to the | |
|
7957 | ConstraintBuilder owning this stack. | |
|
7958 | </summary> | |
|
7959 | <param name="constraint">The constraint.</param> | |
|
7960 | </member> | |
|
7961 | <member name="M:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Pop"> | |
|
7962 | <summary> | |
|
7963 | Pops this topmost constrait from the stack. | |
|
7964 | As a side effect, the constraint's builder | |
|
7965 | field is set to null. | |
|
7966 | </summary> | |
|
7967 | <returns></returns> | |
|
7968 | </member> | |
|
7969 | <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Empty"> | |
|
7970 | <summary> | |
|
7971 | Gets a value indicating whether this <see cref="T:ConstraintStack"/> is empty. | |
|
7972 | </summary> | |
|
7973 | <value><c>true</c> if empty; otherwise, <c>false</c>.</value> | |
|
7974 | </member> | |
|
7975 | <member name="P:NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack.Top"> | |
|
7976 | <summary> | |
|
7977 | Gets the topmost constraint without modifying the stack. | |
|
7978 | </summary> | |
|
7979 | <value>The topmost constraint</value> | |
|
7980 | </member> | |
|
7981 | <member name="T:NUnit.Framework.Constraints.ConstraintExpression"> | |
|
7982 | <summary> | |
|
7983 | ConstraintExpression represents a compound constraint in the | |
|
7984 | process of being constructed from a series of syntactic elements. | |
|
7985 | ||
|
7986 | Individual elements are appended to the expression as they are | |
|
7987 | reognized. Once an actual Constraint is appended, the expression | |
|
7988 | returns a resolvable Constraint. | |
|
7989 | </summary> | |
|
7990 | </member> | |
|
7991 | <member name="T:NUnit.Framework.Constraints.ConstraintExpressionBase"> | |
|
7992 | <summary> | |
|
7993 | ConstraintExpressionBase is the abstract base class for the | |
|
7994 | ConstraintExpression class, which represents a | |
|
7995 | compound constraint in the process of being constructed | |
|
7996 | from a series of syntactic elements. | |
|
7997 | ||
|
7998 | NOTE: ConstraintExpressionBase is separate because the | |
|
7999 | ConstraintExpression class was generated in earlier | |
|
8000 | versions of NUnit. The two classes may be combined | |
|
8001 | in a future version. | |
|
8002 | </summary> | |
|
8003 | </member> | |
|
8004 | <member name="F:NUnit.Framework.Constraints.ConstraintExpressionBase.builder"> | |
|
8005 | <summary> | |
|
8006 | The ConstraintBuilder holding the elements recognized so far | |
|
8007 | </summary> | |
|
8008 | </member> | |
|
8009 | <member name="M:NUnit.Framework.Constraints.ConstraintExpressionBase.#ctor"> | |
|
8010 | <summary> | |
|
8011 | Initializes a new instance of the <see cref="T:ConstraintExpressionBase"/> class. | |
|
8012 | </summary> | |
|
8013 | </member> | |
|
8014 | <member name="M:NUnit.Framework.Constraints.ConstraintExpressionBase.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> | |
|
8015 | <summary> | |
|
8016 | Initializes a new instance of the <see cref="T:ConstraintExpressionBase"/> | |
|
8017 | class passing in a ConstraintBuilder, which may be pre-populated. | |
|
8018 | </summary> | |
|
8019 | <param name="builder">The builder.</param> | |
|
8020 | </member> | |
|
8021 | <member name="M:NUnit.Framework.Constraints.ConstraintExpressionBase.ToString"> | |
|
8022 | <summary> | |
|
8023 | Returns a string representation of the expression as it | |
|
8024 | currently stands. This should only be used for testing, | |
|
8025 | since it has the side-effect of resolving the expression. | |
|
8026 | </summary> | |
|
8027 | <returns></returns> | |
|
8028 | </member> | |
|
8029 | <member name="M:NUnit.Framework.Constraints.ConstraintExpressionBase.Append(NUnit.Framework.Constraints.ConstraintOperator)"> | |
|
8030 | <summary> | |
|
8031 | Appends an operator to the expression and returns the | |
|
8032 | resulting expression itself. | |
|
8033 | </summary> | |
|
8034 | </member> | |
|
8035 | <member name="M:NUnit.Framework.Constraints.ConstraintExpressionBase.Append(NUnit.Framework.Constraints.SelfResolvingOperator)"> | |
|
8036 | <summary> | |
|
8037 | Appends a self-resolving operator to the expression and | |
|
8038 | returns a new ResolvableConstraintExpression. | |
|
8039 | </summary> | |
|
8040 | </member> | |
|
8041 | <member name="M:NUnit.Framework.Constraints.ConstraintExpressionBase.Append(NUnit.Framework.Constraints.Constraint)"> | |
|
8042 | <summary> | |
|
8043 | Appends a constraint to the expression and returns that | |
|
8044 | constraint, which is associated with the current state | |
|
8045 | of the expression being built. | |
|
8046 | </summary> | |
|
8047 | </member> | |
|
8048 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.#ctor"> | |
|
8049 | <summary> | |
|
8050 | Initializes a new instance of the <see cref="T:ConstraintExpression"/> class. | |
|
8051 | </summary> | |
|
8052 | </member> | |
|
8053 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> | |
|
8054 | <summary> | |
|
8055 | Initializes a new instance of the <see cref="T:ConstraintExpression"/> | |
|
8056 | class passing in a ConstraintBuilder, which may be pre-populated. | |
|
8057 | </summary> | |
|
8058 | <param name="builder">The builder.</param> | |
|
8059 | </member> | |
|
8060 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Exactly(System.Int32)"> | |
|
8061 | <summary> | |
|
8062 | Returns a ConstraintExpression, which will apply | |
|
8063 | the following constraint to all members of a collection, | |
|
8064 | succeeding only if a specified number of them succeed. | |
|
8065 | </summary> | |
|
8066 | </member> | |
|
8067 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Property(System.String)"> | |
|
8068 | <summary> | |
|
8069 | Returns a new PropertyConstraintExpression, which will either | |
|
8070 | test for the existence of the named property on the object | |
|
8071 | being tested or apply any following constraint to that property. | |
|
8072 | </summary> | |
|
8073 | </member> | |
|
8074 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Attribute(System.Type)"> | |
|
8075 | <summary> | |
|
8076 | Returns a new AttributeConstraint checking for the | |
|
8077 | presence of a particular attribute on an object. | |
|
8078 | </summary> | |
|
8079 | </member> | |
|
8080 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Attribute``1"> | |
|
8081 | <summary> | |
|
8082 | Returns a new AttributeConstraint checking for the | |
|
8083 | presence of a particular attribute on an object. | |
|
8084 | </summary> | |
|
8085 | </member> | |
|
8086 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Matches(NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
8087 | <summary> | |
|
8088 | Returns the constraint provided as an argument - used to allow custom | |
|
8089 | custom constraints to easily participate in the syntax. | |
|
8090 | </summary> | |
|
8091 | </member> | |
|
8092 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Matches``1(System.Predicate{``0})"> | |
|
8093 | <summary> | |
|
8094 | Returns the constraint provided as an argument - used to allow custom | |
|
8095 | custom constraints to easily participate in the syntax. | |
|
8096 | </summary> | |
|
8097 | </member> | |
|
8098 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.EqualTo(System.Object)"> | |
|
8099 | <summary> | |
|
8100 | Returns a constraint that tests two items for equality | |
|
8101 | </summary> | |
|
8102 | </member> | |
|
8103 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.SameAs(System.Object)"> | |
|
8104 | <summary> | |
|
8105 | Returns a constraint that tests that two references are the same object | |
|
8106 | </summary> | |
|
8107 | </member> | |
|
8108 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.GreaterThan(System.Object)"> | |
|
8109 | <summary> | |
|
8110 | Returns a constraint that tests whether the | |
|
8111 | actual value is greater than the suppled argument | |
|
8112 | </summary> | |
|
8113 | </member> | |
|
8114 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.GreaterThanOrEqualTo(System.Object)"> | |
|
8115 | <summary> | |
|
8116 | Returns a constraint that tests whether the | |
|
8117 | actual value is greater than or equal to the suppled argument | |
|
8118 | </summary> | |
|
8119 | </member> | |
|
8120 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.AtLeast(System.Object)"> | |
|
8121 | <summary> | |
|
8122 | Returns a constraint that tests whether the | |
|
8123 | actual value is greater than or equal to the suppled argument | |
|
8124 | </summary> | |
|
8125 | </member> | |
|
8126 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.LessThan(System.Object)"> | |
|
8127 | <summary> | |
|
8128 | Returns a constraint that tests whether the | |
|
8129 | actual value is less than the suppled argument | |
|
8130 | </summary> | |
|
8131 | </member> | |
|
8132 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.LessThanOrEqualTo(System.Object)"> | |
|
8133 | <summary> | |
|
8134 | Returns a constraint that tests whether the | |
|
8135 | actual value is less than or equal to the suppled argument | |
|
8136 | </summary> | |
|
8137 | </member> | |
|
8138 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.AtMost(System.Object)"> | |
|
8139 | <summary> | |
|
8140 | Returns a constraint that tests whether the | |
|
8141 | actual value is less than or equal to the suppled argument | |
|
8142 | </summary> | |
|
8143 | </member> | |
|
8144 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.TypeOf(System.Type)"> | |
|
8145 | <summary> | |
|
8146 | Returns a constraint that tests whether the actual | |
|
8147 | value is of the exact type supplied as an argument. | |
|
8148 | </summary> | |
|
8149 | </member> | |
|
8150 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.TypeOf``1"> | |
|
8151 | <summary> | |
|
8152 | Returns a constraint that tests whether the actual | |
|
8153 | value is of the exact type supplied as an argument. | |
|
8154 | </summary> | |
|
8155 | </member> | |
|
8156 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.InstanceOf(System.Type)"> | |
|
8157 | <summary> | |
|
8158 | Returns a constraint that tests whether the actual value | |
|
8159 | is of the type supplied as an argument or a derived type. | |
|
8160 | </summary> | |
|
8161 | </member> | |
|
8162 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.InstanceOf``1"> | |
|
8163 | <summary> | |
|
8164 | Returns a constraint that tests whether the actual value | |
|
8165 | is of the type supplied as an argument or a derived type. | |
|
8166 | </summary> | |
|
8167 | </member> | |
|
8168 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.InstanceOfType(System.Type)"> | |
|
8169 | <summary> | |
|
8170 | Returns a constraint that tests whether the actual value | |
|
8171 | is of the type supplied as an argument or a derived type. | |
|
8172 | </summary> | |
|
8173 | </member> | |
|
8174 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.InstanceOfType``1"> | |
|
8175 | <summary> | |
|
8176 | Returns a constraint that tests whether the actual value | |
|
8177 | is of the type supplied as an argument or a derived type. | |
|
8178 | </summary> | |
|
8179 | </member> | |
|
8180 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.AssignableFrom(System.Type)"> | |
|
8181 | <summary> | |
|
8182 | Returns a constraint that tests whether the actual value | |
|
8183 | is assignable from the type supplied as an argument. | |
|
8184 | </summary> | |
|
8185 | </member> | |
|
8186 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.AssignableFrom``1"> | |
|
8187 | <summary> | |
|
8188 | Returns a constraint that tests whether the actual value | |
|
8189 | is assignable from the type supplied as an argument. | |
|
8190 | </summary> | |
|
8191 | </member> | |
|
8192 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.AssignableTo(System.Type)"> | |
|
8193 | <summary> | |
|
8194 | Returns a constraint that tests whether the actual value | |
|
8195 | is assignable from the type supplied as an argument. | |
|
8196 | </summary> | |
|
8197 | </member> | |
|
8198 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.AssignableTo``1"> | |
|
8199 | <summary> | |
|
8200 | Returns a constraint that tests whether the actual value | |
|
8201 | is assignable from the type supplied as an argument. | |
|
8202 | </summary> | |
|
8203 | </member> | |
|
8204 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.EquivalentTo(System.Collections.IEnumerable)"> | |
|
8205 | <summary> | |
|
8206 | Returns a constraint that tests whether the actual value | |
|
8207 | is a collection containing the same elements as the | |
|
8208 | collection supplied as an argument. | |
|
8209 | </summary> | |
|
8210 | </member> | |
|
8211 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.SubsetOf(System.Collections.IEnumerable)"> | |
|
8212 | <summary> | |
|
8213 | Returns a constraint that tests whether the actual value | |
|
8214 | is a subset of the collection supplied as an argument. | |
|
8215 | </summary> | |
|
8216 | </member> | |
|
8217 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Member(System.Object)"> | |
|
8218 | <summary> | |
|
8219 | Returns a new CollectionContainsConstraint checking for the | |
|
8220 | presence of a particular object in the collection. | |
|
8221 | </summary> | |
|
8222 | </member> | |
|
8223 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Contains(System.Object)"> | |
|
8224 | <summary> | |
|
8225 | Returns a new CollectionContainsConstraint checking for the | |
|
8226 | presence of a particular object in the collection. | |
|
8227 | </summary> | |
|
8228 | </member> | |
|
8229 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Contains(System.String)"> | |
|
8230 | <summary> | |
|
8231 | Returns a new ContainsConstraint. This constraint | |
|
8232 | will, in turn, make use of the appropriate second-level | |
|
8233 | constraint, depending on the type of the actual argument. | |
|
8234 | This overload is only used if the item sought is a string, | |
|
8235 | since any other type implies that we are looking for a | |
|
8236 | collection member. | |
|
8237 | </summary> | |
|
8238 | </member> | |
|
8239 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.StringContaining(System.String)"> | |
|
8240 | <summary> | |
|
8241 | Returns a constraint that succeeds if the actual | |
|
8242 | value contains the substring supplied as an argument. | |
|
8243 | </summary> | |
|
8244 | </member> | |
|
8245 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.ContainsSubstring(System.String)"> | |
|
8246 | <summary> | |
|
8247 | Returns a constraint that succeeds if the actual | |
|
8248 | value contains the substring supplied as an argument. | |
|
8249 | </summary> | |
|
8250 | </member> | |
|
8251 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.StartsWith(System.String)"> | |
|
8252 | <summary> | |
|
8253 | Returns a constraint that succeeds if the actual | |
|
8254 | value starts with the substring supplied as an argument. | |
|
8255 | </summary> | |
|
8256 | </member> | |
|
8257 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.StringStarting(System.String)"> | |
|
8258 | <summary> | |
|
8259 | Returns a constraint that succeeds if the actual | |
|
8260 | value starts with the substring supplied as an argument. | |
|
8261 | </summary> | |
|
8262 | </member> | |
|
8263 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.EndsWith(System.String)"> | |
|
8264 | <summary> | |
|
8265 | Returns a constraint that succeeds if the actual | |
|
8266 | value ends with the substring supplied as an argument. | |
|
8267 | </summary> | |
|
8268 | </member> | |
|
8269 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.StringEnding(System.String)"> | |
|
8270 | <summary> | |
|
8271 | Returns a constraint that succeeds if the actual | |
|
8272 | value ends with the substring supplied as an argument. | |
|
8273 | </summary> | |
|
8274 | </member> | |
|
8275 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.Matches(System.String)"> | |
|
8276 | <summary> | |
|
8277 | Returns a constraint that succeeds if the actual | |
|
8278 | value matches the regular expression supplied as an argument. | |
|
8279 | </summary> | |
|
8280 | </member> | |
|
8281 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.StringMatching(System.String)"> | |
|
8282 | <summary> | |
|
8283 | Returns a constraint that succeeds if the actual | |
|
8284 | value matches the regular expression supplied as an argument. | |
|
8285 | </summary> | |
|
8286 | </member> | |
|
8287 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.SamePath(System.String)"> | |
|
8288 | <summary> | |
|
8289 | Returns a constraint that tests whether the path provided | |
|
8290 | is the same as an expected path after canonicalization. | |
|
8291 | </summary> | |
|
8292 | </member> | |
|
8293 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.SubPath(System.String)"> | |
|
8294 | <summary> | |
|
8295 | Returns a constraint that tests whether the path provided | |
|
8296 | is the same path or under an expected path after canonicalization. | |
|
8297 | </summary> | |
|
8298 | </member> | |
|
8299 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.SamePathOrUnder(System.String)"> | |
|
8300 | <summary> | |
|
8301 | Returns a constraint that tests whether the path provided | |
|
8302 | is the same path or under an expected path after canonicalization. | |
|
8303 | </summary> | |
|
8304 | </member> | |
|
8305 | <member name="M:NUnit.Framework.Constraints.ConstraintExpression.InRange``1(``0,``0)"> | |
|
8306 | <summary> | |
|
8307 | Returns a constraint that tests whether the actual value falls | |
|
8308 | within a specified range. | |
|
8309 | </summary> | |
|
8310 | </member> | |
|
8311 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Not"> | |
|
8312 | <summary> | |
|
8313 | Returns a ConstraintExpression that negates any | |
|
8314 | following constraint. | |
|
8315 | </summary> | |
|
8316 | </member> | |
|
8317 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.No"> | |
|
8318 | <summary> | |
|
8319 | Returns a ConstraintExpression that negates any | |
|
8320 | following constraint. | |
|
8321 | </summary> | |
|
8322 | </member> | |
|
8323 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.All"> | |
|
8324 | <summary> | |
|
8325 | Returns a ConstraintExpression, which will apply | |
|
8326 | the following constraint to all members of a collection, | |
|
8327 | succeeding if all of them succeed. | |
|
8328 | </summary> | |
|
8329 | </member> | |
|
8330 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Some"> | |
|
8331 | <summary> | |
|
8332 | Returns a ConstraintExpression, which will apply | |
|
8333 | the following constraint to all members of a collection, | |
|
8334 | succeeding if at least one of them succeeds. | |
|
8335 | </summary> | |
|
8336 | </member> | |
|
8337 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.None"> | |
|
8338 | <summary> | |
|
8339 | Returns a ConstraintExpression, which will apply | |
|
8340 | the following constraint to all members of a collection, | |
|
8341 | succeeding if all of them fail. | |
|
8342 | </summary> | |
|
8343 | </member> | |
|
8344 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Length"> | |
|
8345 | <summary> | |
|
8346 | Returns a new ConstraintExpression, which will apply the following | |
|
8347 | constraint to the Length property of the object being tested. | |
|
8348 | </summary> | |
|
8349 | </member> | |
|
8350 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Count"> | |
|
8351 | <summary> | |
|
8352 | Returns a new ConstraintExpression, which will apply the following | |
|
8353 | constraint to the Count property of the object being tested. | |
|
8354 | </summary> | |
|
8355 | </member> | |
|
8356 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Message"> | |
|
8357 | <summary> | |
|
8358 | Returns a new ConstraintExpression, which will apply the following | |
|
8359 | constraint to the Message property of the object being tested. | |
|
8360 | </summary> | |
|
8361 | </member> | |
|
8362 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.InnerException"> | |
|
8363 | <summary> | |
|
8364 | Returns a new ConstraintExpression, which will apply the following | |
|
8365 | constraint to the InnerException property of the object being tested. | |
|
8366 | </summary> | |
|
8367 | </member> | |
|
8368 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.With"> | |
|
8369 | <summary> | |
|
8370 | With is currently a NOP - reserved for future use. | |
|
8371 | </summary> | |
|
8372 | </member> | |
|
8373 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Null"> | |
|
8374 | <summary> | |
|
8375 | Returns a constraint that tests for null | |
|
8376 | </summary> | |
|
8377 | </member> | |
|
8378 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.True"> | |
|
8379 | <summary> | |
|
8380 | Returns a constraint that tests for True | |
|
8381 | </summary> | |
|
8382 | </member> | |
|
8383 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.False"> | |
|
8384 | <summary> | |
|
8385 | Returns a constraint that tests for False | |
|
8386 | </summary> | |
|
8387 | </member> | |
|
8388 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Positive"> | |
|
8389 | <summary> | |
|
8390 | Returns a constraint that tests for a positive value | |
|
8391 | </summary> | |
|
8392 | </member> | |
|
8393 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Negative"> | |
|
8394 | <summary> | |
|
8395 | Returns a constraint that tests for a negative value | |
|
8396 | </summary> | |
|
8397 | </member> | |
|
8398 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.NaN"> | |
|
8399 | <summary> | |
|
8400 | Returns a constraint that tests for NaN | |
|
8401 | </summary> | |
|
8402 | </member> | |
|
8403 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Empty"> | |
|
8404 | <summary> | |
|
8405 | Returns a constraint that tests for empty | |
|
8406 | </summary> | |
|
8407 | </member> | |
|
8408 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Unique"> | |
|
8409 | <summary> | |
|
8410 | Returns a constraint that tests whether a collection | |
|
8411 | contains all unique items. | |
|
8412 | </summary> | |
|
8413 | </member> | |
|
8414 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.BinarySerializable"> | |
|
8415 | <summary> | |
|
8416 | Returns a constraint that tests whether an object graph is serializable in binary format. | |
|
8417 | </summary> | |
|
8418 | </member> | |
|
8419 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.XmlSerializable"> | |
|
8420 | <summary> | |
|
8421 | Returns a constraint that tests whether an object graph is serializable in xml format. | |
|
8422 | </summary> | |
|
8423 | </member> | |
|
8424 | <member name="P:NUnit.Framework.Constraints.ConstraintExpression.Ordered"> | |
|
8425 | <summary> | |
|
8426 | Returns a constraint that tests whether a collection is ordered | |
|
8427 | </summary> | |
|
8428 | </member> | |
|
8429 | <member name="T:NUnit.Framework.Constraints.ContainsConstraint"> | |
|
8430 | <summary> | |
|
8431 | ContainsConstraint tests a whether a string contains a substring | |
|
8432 | or a collection contains an object. It postpones the decision of | |
|
8433 | which test to use until the type of the actual argument is known. | |
|
8434 | This allows testing whether a string is contained in a collection | |
|
8435 | or as a substring of another string using the same syntax. | |
|
8436 | </summary> | |
|
8437 | </member> | |
|
8438 | <member name="M:NUnit.Framework.Constraints.ContainsConstraint.#ctor(System.Object)"> | |
|
8439 | <summary> | |
|
8440 | Initializes a new instance of the <see cref="T:NUnit.Framework.Constraints.ContainsConstraint"/> class. | |
|
8441 | </summary> | |
|
8442 | <param name="expected">The expected.</param> | |
|
8443 | </member> | |
|
8444 | <member name="M:NUnit.Framework.Constraints.ContainsConstraint.Matches(System.Object)"> | |
|
8445 | <summary> | |
|
8446 | Test whether the constraint is satisfied by a given value | |
|
8447 | </summary> | |
|
8448 | <param name="actual">The value to be tested</param> | |
|
8449 | <returns>True for success, false for failure</returns> | |
|
8450 | </member> | |
|
8451 | <member name="M:NUnit.Framework.Constraints.ContainsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8452 | <summary> | |
|
8453 | Write the constraint description to a MessageWriter | |
|
8454 | </summary> | |
|
8455 | <param name="writer">The writer on which the description is displayed</param> | |
|
8456 | </member> | |
|
8457 | <member name="M:NUnit.Framework.Constraints.ContainsConstraint.Using(System.Collections.IComparer)"> | |
|
8458 | <summary> | |
|
8459 | Flag the constraint to use the supplied IComparer object. | |
|
8460 | </summary> | |
|
8461 | <param name="comparer">The IComparer object to use.</param> | |
|
8462 | <returns>Self.</returns> | |
|
8463 | </member> | |
|
8464 | <member name="M:NUnit.Framework.Constraints.ContainsConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> | |
|
8465 | <summary> | |
|
8466 | Flag the constraint to use the supplied IComparer object. | |
|
8467 | </summary> | |
|
8468 | <param name="comparer">The IComparer object to use.</param> | |
|
8469 | <returns>Self.</returns> | |
|
8470 | </member> | |
|
8471 | <member name="M:NUnit.Framework.Constraints.ContainsConstraint.Using``1(System.Comparison{``0})"> | |
|
8472 | <summary> | |
|
8473 | Flag the constraint to use the supplied Comparison object. | |
|
8474 | </summary> | |
|
8475 | <param name="comparer">The IComparer object to use.</param> | |
|
8476 | <returns>Self.</returns> | |
|
8477 | </member> | |
|
8478 | <member name="M:NUnit.Framework.Constraints.ContainsConstraint.Using(System.Collections.IEqualityComparer)"> | |
|
8479 | <summary> | |
|
8480 | Flag the constraint to use the supplied IEqualityComparer object. | |
|
8481 | </summary> | |
|
8482 | <param name="comparer">The IComparer object to use.</param> | |
|
8483 | <returns>Self.</returns> | |
|
8484 | </member> | |
|
8485 | <member name="M:NUnit.Framework.Constraints.ContainsConstraint.Using``1(System.Collections.Generic.IEqualityComparer{``0})"> | |
|
8486 | <summary> | |
|
8487 | Flag the constraint to use the supplied IEqualityComparer object. | |
|
8488 | </summary> | |
|
8489 | <param name="comparer">The IComparer object to use.</param> | |
|
8490 | <returns>Self.</returns> | |
|
8491 | </member> | |
|
8492 | <member name="P:NUnit.Framework.Constraints.ContainsConstraint.IgnoreCase"> | |
|
8493 | <summary> | |
|
8494 | Flag the constraint to ignore case and return self. | |
|
8495 | </summary> | |
|
8496 | </member> | |
|
8497 | <member name="T:NUnit.Framework.Constraints.DelayedConstraint"> | |
|
8498 | <summary> | |
|
8499 | Applies a delay to the match so that a match can be evaluated in the future. | |
|
8500 | </summary> | |
|
8501 | </member> | |
|
8502 | <member name="M:NUnit.Framework.Constraints.DelayedConstraint.#ctor(NUnit.Framework.Constraints.Constraint,System.Int32)"> | |
|
8503 | <summary> | |
|
8504 | Creates a new DelayedConstraint | |
|
8505 | </summary> | |
|
8506 | <param name="baseConstraint">The inner constraint two decorate</param> | |
|
8507 | <param name="delayInMilliseconds">The time interval after which the match is performed</param> | |
|
8508 | <exception cref="T:System.InvalidOperationException">If the value of <paramref name="delayInMilliseconds"/> is less than 0</exception> | |
|
8509 | </member> | |
|
8510 | <member name="M:NUnit.Framework.Constraints.DelayedConstraint.#ctor(NUnit.Framework.Constraints.Constraint,System.Int32,System.Int32)"> | |
|
8511 | <summary> | |
|
8512 | Creates a new DelayedConstraint | |
|
8513 | </summary> | |
|
8514 | <param name="baseConstraint">The inner constraint two decorate</param> | |
|
8515 | <param name="delayInMilliseconds">The time interval after which the match is performed</param> | |
|
8516 | <param name="pollingInterval">The time interval used for polling</param> | |
|
8517 | <exception cref="T:System.InvalidOperationException">If the value of <paramref name="delayInMilliseconds"/> is less than 0</exception> | |
|
8518 | </member> | |
|
8519 | <member name="M:NUnit.Framework.Constraints.DelayedConstraint.Matches(System.Object)"> | |
|
8520 | <summary> | |
|
8521 | Test whether the constraint is satisfied by a given value | |
|
8522 | </summary> | |
|
8523 | <param name="actual">The value to be tested</param> | |
|
8524 | <returns>True for if the base constraint fails, false if it succeeds</returns> | |
|
8525 | </member> | |
|
8526 | <member name="M:NUnit.Framework.Constraints.DelayedConstraint.Matches``1(NUnit.Framework.Constraints.ActualValueDelegate{``0})"> | |
|
8527 | <summary> | |
|
8528 | Test whether the constraint is satisfied by a delegate | |
|
8529 | </summary> | |
|
8530 | <param name="del">The delegate whose value is to be tested</param> | |
|
8531 | <returns>True for if the base constraint fails, false if it succeeds</returns> | |
|
8532 | </member> | |
|
8533 | <member name="M:NUnit.Framework.Constraints.DelayedConstraint.Matches``1(``0@)"> | |
|
8534 | <summary> | |
|
8535 | Test whether the constraint is satisfied by a given reference. | |
|
8536 | Overridden to wait for the specified delay period before | |
|
8537 | calling the base constraint with the dereferenced value. | |
|
8538 | </summary> | |
|
8539 | <param name="actual">A reference to the value to be tested</param> | |
|
8540 | <returns>True for success, false for failure</returns> | |
|
8541 | </member> | |
|
8542 | <member name="M:NUnit.Framework.Constraints.DelayedConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8543 | <summary> | |
|
8544 | Write the constraint description to a MessageWriter | |
|
8545 | </summary> | |
|
8546 | <param name="writer">The writer on which the description is displayed</param> | |
|
8547 | </member> | |
|
8548 | <member name="M:NUnit.Framework.Constraints.DelayedConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8549 | <summary> | |
|
8550 | Write the actual value for a failing constraint test to a MessageWriter. | |
|
8551 | </summary> | |
|
8552 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
8553 | </member> | |
|
8554 | <member name="M:NUnit.Framework.Constraints.DelayedConstraint.GetStringRepresentation"> | |
|
8555 | <summary> | |
|
8556 | Returns the string representation of the constraint. | |
|
8557 | </summary> | |
|
8558 | </member> | |
|
8559 | <member name="T:NUnit.Framework.Constraints.EmptyCollectionConstraint"> | |
|
8560 | <summary> | |
|
8561 | EmptyCollectionConstraint tests whether a collection is empty. | |
|
8562 | </summary> | |
|
8563 | </member> | |
|
8564 | <member name="M:NUnit.Framework.Constraints.EmptyCollectionConstraint.doMatch(System.Collections.IEnumerable)"> | |
|
8565 | <summary> | |
|
8566 | Check that the collection is empty | |
|
8567 | </summary> | |
|
8568 | <param name="collection"></param> | |
|
8569 | <returns></returns> | |
|
8570 | </member> | |
|
8571 | <member name="M:NUnit.Framework.Constraints.EmptyCollectionConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8572 | <summary> | |
|
8573 | Write the constraint description to a MessageWriter | |
|
8574 | </summary> | |
|
8575 | <param name="writer"></param> | |
|
8576 | </member> | |
|
8577 | <member name="T:NUnit.Framework.Constraints.EmptyConstraint"> | |
|
8578 | <summary> | |
|
8579 | EmptyConstraint tests a whether a string or collection is empty, | |
|
8580 | postponing the decision about which test is applied until the | |
|
8581 | type of the actual argument is known. | |
|
8582 | </summary> | |
|
8583 | </member> | |
|
8584 | <member name="M:NUnit.Framework.Constraints.EmptyConstraint.Matches(System.Object)"> | |
|
8585 | <summary> | |
|
8586 | Test whether the constraint is satisfied by a given value | |
|
8587 | </summary> | |
|
8588 | <param name="actual">The value to be tested</param> | |
|
8589 | <returns>True for success, false for failure</returns> | |
|
8590 | </member> | |
|
8591 | <member name="M:NUnit.Framework.Constraints.EmptyConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8592 | <summary> | |
|
8593 | Write the constraint description to a MessageWriter | |
|
8594 | </summary> | |
|
8595 | <param name="writer">The writer on which the description is displayed</param> | |
|
8596 | </member> | |
|
8597 | <member name="T:NUnit.Framework.Constraints.EmptyDirectoryConstraint"> | |
|
8598 | <summary> | |
|
8599 | EmptyDirectoryConstraint is used to test that a directory is empty | |
|
8600 | </summary> | |
|
8601 | </member> | |
|
8602 | <member name="M:NUnit.Framework.Constraints.EmptyDirectoryConstraint.Matches(System.Object)"> | |
|
8603 | <summary> | |
|
8604 | Test whether the constraint is satisfied by a given value | |
|
8605 | </summary> | |
|
8606 | <param name="actual">The value to be tested</param> | |
|
8607 | <returns>True for success, false for failure</returns> | |
|
8608 | </member> | |
|
8609 | <member name="M:NUnit.Framework.Constraints.EmptyDirectoryConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8610 | <summary> | |
|
8611 | Write the constraint description to a MessageWriter | |
|
8612 | </summary> | |
|
8613 | <param name="writer">The writer on which the description is displayed</param> | |
|
8614 | </member> | |
|
8615 | <member name="M:NUnit.Framework.Constraints.EmptyDirectoryConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8616 | <summary> | |
|
8617 | Write the actual value for a failing constraint test to a | |
|
8618 | MessageWriter. The default implementation simply writes | |
|
8619 | the raw value of actual, leaving it to the writer to | |
|
8620 | perform any formatting. | |
|
8621 | </summary> | |
|
8622 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
8623 | </member> | |
|
8624 | <member name="T:NUnit.Framework.Constraints.EmptyStringConstraint"> | |
|
8625 | <summary> | |
|
8626 | EmptyStringConstraint tests whether a string is empty. | |
|
8627 | </summary> | |
|
8628 | </member> | |
|
8629 | <member name="M:NUnit.Framework.Constraints.EmptyStringConstraint.Matches(System.Object)"> | |
|
8630 | <summary> | |
|
8631 | Test whether the constraint is satisfied by a given value | |
|
8632 | </summary> | |
|
8633 | <param name="actual">The value to be tested</param> | |
|
8634 | <returns>True for success, false for failure</returns> | |
|
8635 | </member> | |
|
8636 | <member name="M:NUnit.Framework.Constraints.EmptyStringConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8637 | <summary> | |
|
8638 | Write the constraint description to a MessageWriter | |
|
8639 | </summary> | |
|
8640 | <param name="writer">The writer on which the description is displayed</param> | |
|
8641 | </member> | |
|
8642 | <member name="T:NUnit.Framework.Constraints.EndsWithConstraint"> | |
|
8643 | <summary> | |
|
8644 | EndsWithConstraint can test whether a string ends | |
|
8645 | with an expected substring. | |
|
8646 | </summary> | |
|
8647 | </member> | |
|
8648 | <member name="T:NUnit.Framework.Constraints.StringConstraint"> | |
|
8649 | <summary> | |
|
8650 | StringConstraint is the abstract base for constraints | |
|
8651 | that operate on strings. It supports the IgnoreCase | |
|
8652 | modifier for string operations. | |
|
8653 | </summary> | |
|
8654 | </member> | |
|
8655 | <member name="F:NUnit.Framework.Constraints.StringConstraint.expected"> | |
|
8656 | <summary> | |
|
8657 | The expected value | |
|
8658 | </summary> | |
|
8659 | </member> | |
|
8660 | <member name="F:NUnit.Framework.Constraints.StringConstraint.caseInsensitive"> | |
|
8661 | <summary> | |
|
8662 | Indicates whether tests should be case-insensitive | |
|
8663 | </summary> | |
|
8664 | </member> | |
|
8665 | <member name="M:NUnit.Framework.Constraints.StringConstraint.#ctor(System.String)"> | |
|
8666 | <summary> | |
|
8667 | Constructs a StringConstraint given an expected value | |
|
8668 | </summary> | |
|
8669 | <param name="expected">The expected value</param> | |
|
8670 | </member> | |
|
8671 | <member name="M:NUnit.Framework.Constraints.StringConstraint.Matches(System.Object)"> | |
|
8672 | <summary> | |
|
8673 | Test whether the constraint is satisfied by a given value | |
|
8674 | </summary> | |
|
8675 | <param name="actual">The value to be tested</param> | |
|
8676 | <returns>True for success, false for failure</returns> | |
|
8677 | </member> | |
|
8678 | <member name="M:NUnit.Framework.Constraints.StringConstraint.Matches(System.String)"> | |
|
8679 | <summary> | |
|
8680 | Test whether the constraint is satisfied by a given string | |
|
8681 | </summary> | |
|
8682 | <param name="actual">The string to be tested</param> | |
|
8683 | <returns>True for success, false for failure</returns> | |
|
8684 | </member> | |
|
8685 | <member name="P:NUnit.Framework.Constraints.StringConstraint.IgnoreCase"> | |
|
8686 | <summary> | |
|
8687 | Modify the constraint to ignore case in matching. | |
|
8688 | </summary> | |
|
8689 | </member> | |
|
8690 | <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.#ctor(System.String)"> | |
|
8691 | <summary> | |
|
8692 | Initializes a new instance of the <see cref="T:EndsWithConstraint"/> class. | |
|
8693 | </summary> | |
|
8694 | <param name="expected">The expected string</param> | |
|
8695 | </member> | |
|
8696 | <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.Matches(System.String)"> | |
|
8697 | <summary> | |
|
8698 | Test whether the constraint is matched by the actual value. | |
|
8699 | This is a template method, which calls the IsMatch method | |
|
8700 | of the derived class. | |
|
8701 | </summary> | |
|
8702 | <param name="actual"></param> | |
|
8703 | <returns></returns> | |
|
8704 | </member> | |
|
8705 | <member name="M:NUnit.Framework.Constraints.EndsWithConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8706 | <summary> | |
|
8707 | Write the constraint description to a MessageWriter | |
|
8708 | </summary> | |
|
8709 | <param name="writer">The writer on which the description is displayed</param> | |
|
8710 | </member> | |
|
8711 | <member name="T:NUnit.Framework.Constraints.EqualConstraint"> | |
|
8712 | <summary> | |
|
8713 | EqualConstraint is able to compare an actual value with the | |
|
8714 | expected value provided in its constructor. Two objects are | |
|
8715 | considered equal if both are null, or if both have the same | |
|
8716 | value. NUnit has special semantics for some object types. | |
|
8717 | </summary> | |
|
8718 | </member> | |
|
8719 | <member name="F:NUnit.Framework.Constraints.EqualConstraint.clipStrings"> | |
|
8720 | <summary> | |
|
8721 | If true, strings in error messages will be clipped | |
|
8722 | </summary> | |
|
8723 | </member> | |
|
8724 | <member name="F:NUnit.Framework.Constraints.EqualConstraint.comparer"> | |
|
8725 | <summary> | |
|
8726 | NUnitEqualityComparer used to test equality. | |
|
8727 | </summary> | |
|
8728 | </member> | |
|
8729 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.#ctor(System.Object)"> | |
|
8730 | <summary> | |
|
8731 | Initializes a new instance of the <see cref="T:NUnit.Framework.Constraints.EqualConstraint"/> class. | |
|
8732 | </summary> | |
|
8733 | <param name="expected">The expected value.</param> | |
|
8734 | </member> | |
|
8735 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.Within(System.Object)"> | |
|
8736 | <summary> | |
|
8737 | Flag the constraint to use a tolerance when determining equality. | |
|
8738 | </summary> | |
|
8739 | <param name="amount">Tolerance value to be used</param> | |
|
8740 | <returns>Self.</returns> | |
|
8741 | </member> | |
|
8742 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.Comparer(System.Collections.IComparer)"> | |
|
8743 | <summary> | |
|
8744 | Flag the constraint to use the supplied IComparer object. | |
|
8745 | </summary> | |
|
8746 | <param name="comparer">The IComparer object to use.</param> | |
|
8747 | <returns>Self.</returns> | |
|
8748 | </member> | |
|
8749 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using(System.Collections.IComparer)"> | |
|
8750 | <summary> | |
|
8751 | Flag the constraint to use the supplied IComparer object. | |
|
8752 | </summary> | |
|
8753 | <param name="comparer">The IComparer object to use.</param> | |
|
8754 | <returns>Self.</returns> | |
|
8755 | </member> | |
|
8756 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using``1(System.Collections.Generic.IComparer{``0})"> | |
|
8757 | <summary> | |
|
8758 | Flag the constraint to use the supplied IComparer object. | |
|
8759 | </summary> | |
|
8760 | <param name="comparer">The IComparer object to use.</param> | |
|
8761 | <returns>Self.</returns> | |
|
8762 | </member> | |
|
8763 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using``1(System.Comparison{``0})"> | |
|
8764 | <summary> | |
|
8765 | Flag the constraint to use the supplied Comparison object. | |
|
8766 | </summary> | |
|
8767 | <param name="comparer">The IComparer object to use.</param> | |
|
8768 | <returns>Self.</returns> | |
|
8769 | </member> | |
|
8770 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using(System.Collections.IEqualityComparer)"> | |
|
8771 | <summary> | |
|
8772 | Flag the constraint to use the supplied IEqualityComparer object. | |
|
8773 | </summary> | |
|
8774 | <param name="comparer">The IComparer object to use.</param> | |
|
8775 | <returns>Self.</returns> | |
|
8776 | </member> | |
|
8777 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.Using``1(System.Collections.Generic.IEqualityComparer{``0})"> | |
|
8778 | <summary> | |
|
8779 | Flag the constraint to use the supplied IEqualityComparer object. | |
|
8780 | </summary> | |
|
8781 | <param name="comparer">The IComparer object to use.</param> | |
|
8782 | <returns>Self.</returns> | |
|
8783 | </member> | |
|
8784 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.Matches(System.Object)"> | |
|
8785 | <summary> | |
|
8786 | Test whether the constraint is satisfied by a given value | |
|
8787 | </summary> | |
|
8788 | <param name="actual">The value to be tested</param> | |
|
8789 | <returns>True for success, false for failure</returns> | |
|
8790 | </member> | |
|
8791 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.WriteMessageTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8792 | <summary> | |
|
8793 | Write a failure message. Overridden to provide custom | |
|
8794 | failure messages for EqualConstraint. | |
|
8795 | </summary> | |
|
8796 | <param name="writer">The MessageWriter to write to</param> | |
|
8797 | </member> | |
|
8798 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
8799 | <summary> | |
|
8800 | Write description of this constraint | |
|
8801 | </summary> | |
|
8802 | <param name="writer">The MessageWriter to write to</param> | |
|
8803 | </member> | |
|
8804 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayCollectionDifferences(NUnit.Framework.Constraints.MessageWriter,System.Collections.ICollection,System.Collections.ICollection,System.Int32)"> | |
|
8805 | <summary> | |
|
8806 | Display the failure information for two collections that did not match. | |
|
8807 | </summary> | |
|
8808 | <param name="writer">The MessageWriter on which to display</param> | |
|
8809 | <param name="expected">The expected collection.</param> | |
|
8810 | <param name="actual">The actual collection</param> | |
|
8811 | <param name="depth">The depth of this failure in a set of nested collections</param> | |
|
8812 | </member> | |
|
8813 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayTypesAndSizes(NUnit.Framework.Constraints.MessageWriter,System.Collections.IEnumerable,System.Collections.IEnumerable,System.Int32)"> | |
|
8814 | <summary> | |
|
8815 | Displays a single line showing the types and sizes of the expected | |
|
8816 | and actual enumerations, collections or arrays. If both are identical, | |
|
8817 | the value is only shown once. | |
|
8818 | </summary> | |
|
8819 | <param name="writer">The MessageWriter on which to display</param> | |
|
8820 | <param name="expected">The expected collection or array</param> | |
|
8821 | <param name="actual">The actual collection or array</param> | |
|
8822 | <param name="indent">The indentation level for the message line</param> | |
|
8823 | </member> | |
|
8824 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayFailurePoint(NUnit.Framework.Constraints.MessageWriter,System.Collections.IEnumerable,System.Collections.IEnumerable,NUnit.Framework.Constraints.FailurePoint,System.Int32)"> | |
|
8825 | <summary> | |
|
8826 | Displays a single line showing the point in the expected and actual | |
|
8827 | arrays at which the comparison failed. If the arrays have different | |
|
8828 | structures or dimensions, both values are shown. | |
|
8829 | </summary> | |
|
8830 | <param name="writer">The MessageWriter on which to display</param> | |
|
8831 | <param name="expected">The expected array</param> | |
|
8832 | <param name="actual">The actual array</param> | |
|
8833 | <param name="failurePoint">Index of the failure point in the underlying collections</param> | |
|
8834 | <param name="indent">The indentation level for the message line</param> | |
|
8835 | </member> | |
|
8836 | <member name="M:NUnit.Framework.Constraints.EqualConstraint.DisplayEnumerableDifferences(NUnit.Framework.Constraints.MessageWriter,System.Collections.IEnumerable,System.Collections.IEnumerable,System.Int32)"> | |
|
8837 | <summary> | |
|
8838 | Display the failure information for two IEnumerables that did not match. | |
|
8839 | </summary> | |
|
8840 | <param name="writer">The MessageWriter on which to display</param> | |
|
8841 | <param name="expected">The expected enumeration.</param> | |
|
8842 | <param name="actual">The actual enumeration</param> | |
|
8843 | <param name="depth">The depth of this failure in a set of nested collections</param> | |
|
8844 | </member> | |
|
8845 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.IgnoreCase"> | |
|
8846 | <summary> | |
|
8847 | Flag the constraint to ignore case and return self. | |
|
8848 | </summary> | |
|
8849 | </member> | |
|
8850 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.NoClip"> | |
|
8851 | <summary> | |
|
8852 | Flag the constraint to suppress string clipping | |
|
8853 | and return self. | |
|
8854 | </summary> | |
|
8855 | </member> | |
|
8856 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.AsCollection"> | |
|
8857 | <summary> | |
|
8858 | Flag the constraint to compare arrays as collections | |
|
8859 | and return self. | |
|
8860 | </summary> | |
|
8861 | </member> | |
|
8862 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.Ulps"> | |
|
8863 | <summary> | |
|
8864 | Switches the .Within() modifier to interpret its tolerance as | |
|
8865 | a distance in representable values (see remarks). | |
|
8866 | </summary> | |
|
8867 | <returns>Self.</returns> | |
|
8868 | <remarks> | |
|
8869 | Ulp stands for "unit in the last place" and describes the minimum | |
|
8870 | amount a given value can change. For any integers, an ulp is 1 whole | |
|
8871 | digit. For floating point values, the accuracy of which is better | |
|
8872 | for smaller numbers and worse for larger numbers, an ulp depends | |
|
8873 | on the size of the number. Using ulps for comparison of floating | |
|
8874 | point results instead of fixed tolerances is safer because it will | |
|
8875 | automatically compensate for the added inaccuracy of larger numbers. | |
|
8876 | </remarks> | |
|
8877 | </member> | |
|
8878 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.Percent"> | |
|
8879 | <summary> | |
|
8880 | Switches the .Within() modifier to interpret its tolerance as | |
|
8881 | a percentage that the actual values is allowed to deviate from | |
|
8882 | the expected value. | |
|
8883 | </summary> | |
|
8884 | <returns>Self</returns> | |
|
8885 | </member> | |
|
8886 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.Days"> | |
|
8887 | <summary> | |
|
8888 | Causes the tolerance to be interpreted as a TimeSpan in days. | |
|
8889 | </summary> | |
|
8890 | <returns>Self</returns> | |
|
8891 | </member> | |
|
8892 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.Hours"> | |
|
8893 | <summary> | |
|
8894 | Causes the tolerance to be interpreted as a TimeSpan in hours. | |
|
8895 | </summary> | |
|
8896 | <returns>Self</returns> | |
|
8897 | </member> | |
|
8898 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.Minutes"> | |
|
8899 | <summary> | |
|
8900 | Causes the tolerance to be interpreted as a TimeSpan in minutes. | |
|
8901 | </summary> | |
|
8902 | <returns>Self</returns> | |
|
8903 | </member> | |
|
8904 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.Seconds"> | |
|
8905 | <summary> | |
|
8906 | Causes the tolerance to be interpreted as a TimeSpan in seconds. | |
|
8907 | </summary> | |
|
8908 | <returns>Self</returns> | |
|
8909 | </member> | |
|
8910 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.Milliseconds"> | |
|
8911 | <summary> | |
|
8912 | Causes the tolerance to be interpreted as a TimeSpan in milliseconds. | |
|
8913 | </summary> | |
|
8914 | <returns>Self</returns> | |
|
8915 | </member> | |
|
8916 | <member name="P:NUnit.Framework.Constraints.EqualConstraint.Ticks"> | |
|
8917 | <summary> | |
|
8918 | Causes the tolerance to be interpreted as a TimeSpan in clock ticks. | |
|
8919 | </summary> | |
|
8920 | <returns>Self</returns> | |
|
8921 | </member> | |
|
8922 | <member name="T:NUnit.Framework.Constraints.EqualityAdapter"> | |
|
8923 | <summary> | |
|
8924 | EqualityAdapter class handles all equality comparisons | |
|
8925 | that use an IEqualityComparer, IEqualityComparer<T> | |
|
8926 | or a ComparisonAdapter. | |
|
8927 | </summary> | |
|
8928 | </member> | |
|
8929 | <member name="M:NUnit.Framework.Constraints.EqualityAdapter.AreEqual(System.Object,System.Object)"> | |
|
8930 | <summary> | |
|
8931 | Compares two objects, returning true if they are equal | |
|
8932 | </summary> | |
|
8933 | </member> | |
|
8934 | <member name="M:NUnit.Framework.Constraints.EqualityAdapter.CanCompare(System.Object,System.Object)"> | |
|
8935 | <summary> | |
|
8936 | Returns true if the two objects can be compared by this adapter. | |
|
8937 | The base adapter cannot handle IEnumerables except for strings. | |
|
8938 | </summary> | |
|
8939 | </member> | |
|
8940 | <member name="M:NUnit.Framework.Constraints.EqualityAdapter.For(System.Collections.IComparer)"> | |
|
8941 | <summary> | |
|
8942 | Returns an EqualityAdapter that wraps an IComparer. | |
|
8943 | </summary> | |
|
8944 | </member> | |
|
8945 | <member name="M:NUnit.Framework.Constraints.EqualityAdapter.For(System.Collections.IEqualityComparer)"> | |
|
8946 | <summary> | |
|
8947 | Returns an EqualityAdapter that wraps an IEqualityComparer. | |
|
8948 | </summary> | |
|
8949 | </member> | |
|
8950 | <member name="M:NUnit.Framework.Constraints.EqualityAdapter.For``1(System.Collections.Generic.IEqualityComparer{``0})"> | |
|
8951 | <summary> | |
|
8952 | Returns an EqualityAdapter that wraps an IEqualityComparer<T>. | |
|
8953 | </summary> | |
|
8954 | </member> | |
|
8955 | <member name="M:NUnit.Framework.Constraints.EqualityAdapter.For``1(System.Collections.Generic.IComparer{``0})"> | |
|
8956 | <summary> | |
|
8957 | Returns an EqualityAdapter that wraps an IComparer<T>. | |
|
8958 | </summary> | |
|
8959 | </member> | |
|
8960 | <member name="M:NUnit.Framework.Constraints.EqualityAdapter.For``1(System.Comparison{``0})"> | |
|
8961 | <summary> | |
|
8962 | Returns an EqualityAdapter that wraps a Comparison<T>. | |
|
8963 | </summary> | |
|
8964 | </member> | |
|
8965 | <member name="T:NUnit.Framework.Constraints.EqualityAdapter.ComparerAdapter"> | |
|
8966 | <summary> | |
|
8967 | EqualityAdapter that wraps an IComparer. | |
|
8968 | </summary> | |
|
8969 | </member> | |
|
8970 | <member name="M:NUnit.Framework.Constraints.EqualityAdapter.GenericEqualityAdapter`1.CanCompare(System.Object,System.Object)"> | |
|
8971 | <summary> | |
|
8972 | Returns true if the two objects can be compared by this adapter. | |
|
8973 | Generic adapter requires objects of the specified type. | |
|
8974 | </summary> | |
|
8975 | </member> | |
|
8976 | <member name="T:NUnit.Framework.Constraints.EqualityAdapter.ComparerAdapter`1"> | |
|
8977 | <summary> | |
|
8978 | EqualityAdapter that wraps an IComparer. | |
|
8979 | </summary> | |
|
8980 | </member> | |
|
8981 | <member name="T:NUnit.Framework.Constraints.EqualityAdapterList"> | |
|
8982 | <summary> | |
|
8983 | EqualityAdapterList represents a list of EqualityAdapters | |
|
8984 | in a common class across platforms. | |
|
8985 | </summary> | |
|
8986 | </member> | |
|
8987 | <member name="T:NUnit.Framework.Constraints.ExactCountConstraint"> | |
|
8988 | <summary> | |
|
8989 | ExactCountConstraint applies another constraint to each | |
|
8990 | item in a collection, succeeding only if a specified | |
|
8991 | number of items succeed. | |
|
8992 | </summary> | |
|
8993 | </member> | |
|
8994 | <member name="M:NUnit.Framework.Constraints.ExactCountConstraint.#ctor(System.Int32,NUnit.Framework.Constraints.Constraint)"> | |
|
8995 | <summary> | |
|
8996 | Construct an ExactCountConstraint on top of an existing constraint | |
|
8997 | </summary> | |
|
8998 | <param name="expectedCount"></param> | |
|
8999 | <param name="itemConstraint"></param> | |
|
9000 | </member> | |
|
9001 | <member name="M:NUnit.Framework.Constraints.ExactCountConstraint.Matches(System.Object)"> | |
|
9002 | <summary> | |
|
9003 | Apply the item constraint to each item in the collection, | |
|
9004 | succeeding only if the expected number of items pass. | |
|
9005 | </summary> | |
|
9006 | <param name="actual"></param> | |
|
9007 | <returns></returns> | |
|
9008 | </member> | |
|
9009 | <member name="M:NUnit.Framework.Constraints.ExactCountConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9010 | <summary> | |
|
9011 | Write a description of this constraint to a MessageWriter | |
|
9012 | </summary> | |
|
9013 | <param name="writer"></param> | |
|
9014 | </member> | |
|
9015 | <member name="T:NUnit.Framework.Constraints.ExactTypeConstraint"> | |
|
9016 | <summary> | |
|
9017 | ExactTypeConstraint is used to test that an object | |
|
9018 | is of the exact type provided in the constructor | |
|
9019 | </summary> | |
|
9020 | </member> | |
|
9021 | <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.#ctor(System.Type)"> | |
|
9022 | <summary> | |
|
9023 | Construct an ExactTypeConstraint for a given Type | |
|
9024 | </summary> | |
|
9025 | <param name="type">The expected Type.</param> | |
|
9026 | </member> | |
|
9027 | <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.Matches(System.Object)"> | |
|
9028 | <summary> | |
|
9029 | Test that an object is of the exact type specified | |
|
9030 | </summary> | |
|
9031 | <param name="actual">The actual value.</param> | |
|
9032 | <returns>True if the tested object is of the exact type provided, otherwise false.</returns> | |
|
9033 | </member> | |
|
9034 | <member name="M:NUnit.Framework.Constraints.ExactTypeConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9035 | <summary> | |
|
9036 | Write the description of this constraint to a MessageWriter | |
|
9037 | </summary> | |
|
9038 | <param name="writer">The MessageWriter to use</param> | |
|
9039 | </member> | |
|
9040 | <member name="T:NUnit.Framework.Constraints.ExceptionTypeConstraint"> | |
|
9041 | <summary> | |
|
9042 | ExceptionTypeConstraint is a special version of ExactTypeConstraint | |
|
9043 | used to provided detailed info about the exception thrown in | |
|
9044 | an error message. | |
|
9045 | </summary> | |
|
9046 | </member> | |
|
9047 | <member name="M:NUnit.Framework.Constraints.ExceptionTypeConstraint.#ctor(System.Type)"> | |
|
9048 | <summary> | |
|
9049 | Constructs an ExceptionTypeConstraint | |
|
9050 | </summary> | |
|
9051 | </member> | |
|
9052 | <member name="M:NUnit.Framework.Constraints.ExceptionTypeConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9053 | <summary> | |
|
9054 | Write the actual value for a failing constraint test to a | |
|
9055 | MessageWriter. Overriden to write additional information | |
|
9056 | in the case of an Exception. | |
|
9057 | </summary> | |
|
9058 | <param name="writer">The MessageWriter to use</param> | |
|
9059 | </member> | |
|
9060 | <member name="T:NUnit.Framework.Constraints.FailurePoint"> | |
|
9061 | <summary> | |
|
9062 | FailurePoint class represents one point of failure | |
|
9063 | in an equality test. | |
|
9064 | </summary> | |
|
9065 | </member> | |
|
9066 | <member name="F:NUnit.Framework.Constraints.FailurePoint.Position"> | |
|
9067 | <summary> | |
|
9068 | The location of the failure | |
|
9069 | </summary> | |
|
9070 | </member> | |
|
9071 | <member name="F:NUnit.Framework.Constraints.FailurePoint.ExpectedValue"> | |
|
9072 | <summary> | |
|
9073 | The expected value | |
|
9074 | </summary> | |
|
9075 | </member> | |
|
9076 | <member name="F:NUnit.Framework.Constraints.FailurePoint.ActualValue"> | |
|
9077 | <summary> | |
|
9078 | The actual value | |
|
9079 | </summary> | |
|
9080 | </member> | |
|
9081 | <member name="F:NUnit.Framework.Constraints.FailurePoint.ExpectedHasData"> | |
|
9082 | <summary> | |
|
9083 | Indicates whether the expected value is valid | |
|
9084 | </summary> | |
|
9085 | </member> | |
|
9086 | <member name="F:NUnit.Framework.Constraints.FailurePoint.ActualHasData"> | |
|
9087 | <summary> | |
|
9088 | Indicates whether the actual value is valid | |
|
9089 | </summary> | |
|
9090 | </member> | |
|
9091 | <member name="T:NUnit.Framework.Constraints.FailurePointList"> | |
|
9092 | <summary> | |
|
9093 | FailurePointList represents a set of FailurePoints | |
|
9094 | in a cross-platform way. | |
|
9095 | </summary> | |
|
9096 | </member> | |
|
9097 | <member name="T:NUnit.Framework.Constraints.FalseConstraint"> | |
|
9098 | <summary> | |
|
9099 | FalseConstraint tests that the actual value is false | |
|
9100 | </summary> | |
|
9101 | </member> | |
|
9102 | <member name="M:NUnit.Framework.Constraints.FalseConstraint.#ctor"> | |
|
9103 | <summary> | |
|
9104 | Initializes a new instance of the <see cref="T:FalseConstraint"/> class. | |
|
9105 | </summary> | |
|
9106 | </member> | |
|
9107 | <member name="T:NUnit.Framework.Constraints.FloatingPointNumerics"> | |
|
9108 | <summary>Helper routines for working with floating point numbers</summary> | |
|
9109 | <remarks> | |
|
9110 | <para> | |
|
9111 | The floating point comparison code is based on this excellent article: | |
|
9112 | http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm | |
|
9113 | </para> | |
|
9114 | <para> | |
|
9115 | "ULP" means Unit in the Last Place and in the context of this library refers to | |
|
9116 | the distance between two adjacent floating point numbers. IEEE floating point | |
|
9117 | numbers can only represent a finite subset of natural numbers, with greater | |
|
9118 | accuracy for smaller numbers and lower accuracy for very large numbers. | |
|
9119 | </para> | |
|
9120 | <para> | |
|
9121 | If a comparison is allowed "2 ulps" of deviation, that means the values are | |
|
9122 | allowed to deviate by up to 2 adjacent floating point values, which might be | |
|
9123 | as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. | |
|
9124 | </para> | |
|
9125 | </remarks> | |
|
9126 | </member> | |
|
9127 | <member name="M:NUnit.Framework.Constraints.FloatingPointNumerics.AreAlmostEqualUlps(System.Single,System.Single,System.Int32)"> | |
|
9128 | <summary>Compares two floating point values for equality</summary> | |
|
9129 | <param name="left">First floating point value to be compared</param> | |
|
9130 | <param name="right">Second floating point value t be compared</param> | |
|
9131 | <param name="maxUlps"> | |
|
9132 | Maximum number of representable floating point values that are allowed to | |
|
9133 | be between the left and the right floating point values | |
|
9134 | </param> | |
|
9135 | <returns>True if both numbers are equal or close to being equal</returns> | |
|
9136 | <remarks> | |
|
9137 | <para> | |
|
9138 | Floating point values can only represent a finite subset of natural numbers. | |
|
9139 | For example, the values 2.00000000 and 2.00000024 can be stored in a float, | |
|
9140 | but nothing inbetween them. | |
|
9141 | </para> | |
|
9142 | <para> | |
|
9143 | This comparison will count how many possible floating point values are between | |
|
9144 | the left and the right number. If the number of possible values between both | |
|
9145 | numbers is less than or equal to maxUlps, then the numbers are considered as | |
|
9146 | being equal. | |
|
9147 | </para> | |
|
9148 | <para> | |
|
9149 | Implementation partially follows the code outlined here: | |
|
9150 | http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ | |
|
9151 | </para> | |
|
9152 | </remarks> | |
|
9153 | </member> | |
|
9154 | <member name="M:NUnit.Framework.Constraints.FloatingPointNumerics.AreAlmostEqualUlps(System.Double,System.Double,System.Int64)"> | |
|
9155 | <summary>Compares two double precision floating point values for equality</summary> | |
|
9156 | <param name="left">First double precision floating point value to be compared</param> | |
|
9157 | <param name="right">Second double precision floating point value t be compared</param> | |
|
9158 | <param name="maxUlps"> | |
|
9159 | Maximum number of representable double precision floating point values that are | |
|
9160 | allowed to be between the left and the right double precision floating point values | |
|
9161 | </param> | |
|
9162 | <returns>True if both numbers are equal or close to being equal</returns> | |
|
9163 | <remarks> | |
|
9164 | <para> | |
|
9165 | Double precision floating point values can only represent a limited series of | |
|
9166 | natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004 | |
|
9167 | can be stored in a double, but nothing inbetween them. | |
|
9168 | </para> | |
|
9169 | <para> | |
|
9170 | This comparison will count how many possible double precision floating point | |
|
9171 | values are between the left and the right number. If the number of possible | |
|
9172 | values between both numbers is less than or equal to maxUlps, then the numbers | |
|
9173 | are considered as being equal. | |
|
9174 | </para> | |
|
9175 | <para> | |
|
9176 | Implementation partially follows the code outlined here: | |
|
9177 | http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ | |
|
9178 | </para> | |
|
9179 | </remarks> | |
|
9180 | </member> | |
|
9181 | <member name="M:NUnit.Framework.Constraints.FloatingPointNumerics.ReinterpretAsInt(System.Single)"> | |
|
9182 | <summary> | |
|
9183 | Reinterprets the memory contents of a floating point value as an integer value | |
|
9184 | </summary> | |
|
9185 | <param name="value"> | |
|
9186 | Floating point value whose memory contents to reinterpret | |
|
9187 | </param> | |
|
9188 | <returns> | |
|
9189 | The memory contents of the floating point value interpreted as an integer | |
|
9190 | </returns> | |
|
9191 | </member> | |
|
9192 | <member name="M:NUnit.Framework.Constraints.FloatingPointNumerics.ReinterpretAsLong(System.Double)"> | |
|
9193 | <summary> | |
|
9194 | Reinterprets the memory contents of a double precision floating point | |
|
9195 | value as an integer value | |
|
9196 | </summary> | |
|
9197 | <param name="value"> | |
|
9198 | Double precision floating point value whose memory contents to reinterpret | |
|
9199 | </param> | |
|
9200 | <returns> | |
|
9201 | The memory contents of the double precision floating point value | |
|
9202 | interpreted as an integer | |
|
9203 | </returns> | |
|
9204 | </member> | |
|
9205 | <member name="M:NUnit.Framework.Constraints.FloatingPointNumerics.ReinterpretAsFloat(System.Int32)"> | |
|
9206 | <summary> | |
|
9207 | Reinterprets the memory contents of an integer as a floating point value | |
|
9208 | </summary> | |
|
9209 | <param name="value">Integer value whose memory contents to reinterpret</param> | |
|
9210 | <returns> | |
|
9211 | The memory contents of the integer value interpreted as a floating point value | |
|
9212 | </returns> | |
|
9213 | </member> | |
|
9214 | <member name="M:NUnit.Framework.Constraints.FloatingPointNumerics.ReinterpretAsDouble(System.Int64)"> | |
|
9215 | <summary> | |
|
9216 | Reinterprets the memory contents of an integer value as a double precision | |
|
9217 | floating point value | |
|
9218 | </summary> | |
|
9219 | <param name="value">Integer whose memory contents to reinterpret</param> | |
|
9220 | <returns> | |
|
9221 | The memory contents of the integer interpreted as a double precision | |
|
9222 | floating point value | |
|
9223 | </returns> | |
|
9224 | </member> | |
|
9225 | <member name="T:NUnit.Framework.Constraints.FloatingPointNumerics.FloatIntUnion"> | |
|
9226 | <summary>Union of a floating point variable and an integer</summary> | |
|
9227 | </member> | |
|
9228 | <member name="F:NUnit.Framework.Constraints.FloatingPointNumerics.FloatIntUnion.Float"> | |
|
9229 | <summary>The union's value as a floating point variable</summary> | |
|
9230 | </member> | |
|
9231 | <member name="F:NUnit.Framework.Constraints.FloatingPointNumerics.FloatIntUnion.Int"> | |
|
9232 | <summary>The union's value as an integer</summary> | |
|
9233 | </member> | |
|
9234 | <member name="F:NUnit.Framework.Constraints.FloatingPointNumerics.FloatIntUnion.UInt"> | |
|
9235 | <summary>The union's value as an unsigned integer</summary> | |
|
9236 | </member> | |
|
9237 | <member name="T:NUnit.Framework.Constraints.FloatingPointNumerics.DoubleLongUnion"> | |
|
9238 | <summary>Union of a double precision floating point variable and a long</summary> | |
|
9239 | </member> | |
|
9240 | <member name="F:NUnit.Framework.Constraints.FloatingPointNumerics.DoubleLongUnion.Double"> | |
|
9241 | <summary>The union's value as a double precision floating point variable</summary> | |
|
9242 | </member> | |
|
9243 | <member name="F:NUnit.Framework.Constraints.FloatingPointNumerics.DoubleLongUnion.Long"> | |
|
9244 | <summary>The union's value as a long</summary> | |
|
9245 | </member> | |
|
9246 | <member name="F:NUnit.Framework.Constraints.FloatingPointNumerics.DoubleLongUnion.ULong"> | |
|
9247 | <summary>The union's value as an unsigned long</summary> | |
|
9248 | </member> | |
|
9249 | <member name="T:NUnit.Framework.Constraints.GreaterThanConstraint"> | |
|
9250 | <summary> | |
|
9251 | Tests whether a value is greater than the value supplied to its constructor | |
|
9252 | </summary> | |
|
9253 | </member> | |
|
9254 | <member name="F:NUnit.Framework.Constraints.GreaterThanConstraint.expected"> | |
|
9255 | <summary> | |
|
9256 | The value against which a comparison is to be made | |
|
9257 | </summary> | |
|
9258 | </member> | |
|
9259 | <member name="M:NUnit.Framework.Constraints.GreaterThanConstraint.#ctor(System.Object)"> | |
|
9260 | <summary> | |
|
9261 | Initializes a new instance of the <see cref="T:GreaterThanConstraint"/> class. | |
|
9262 | </summary> | |
|
9263 | <param name="expected">The expected value.</param> | |
|
9264 | </member> | |
|
9265 | <member name="M:NUnit.Framework.Constraints.GreaterThanConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9266 | <summary> | |
|
9267 | Write the constraint description to a MessageWriter | |
|
9268 | </summary> | |
|
9269 | <param name="writer">The writer on which the description is displayed</param> | |
|
9270 | </member> | |
|
9271 | <member name="M:NUnit.Framework.Constraints.GreaterThanConstraint.Matches(System.Object)"> | |
|
9272 | <summary> | |
|
9273 | Test whether the constraint is satisfied by a given value | |
|
9274 | </summary> | |
|
9275 | <param name="actual">The value to be tested</param> | |
|
9276 | <returns>True for success, false for failure</returns> | |
|
9277 | </member> | |
|
9278 | <member name="T:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint"> | |
|
9279 | <summary> | |
|
9280 | Tests whether a value is greater than or equal to the value supplied to its constructor | |
|
9281 | </summary> | |
|
9282 | </member> | |
|
9283 | <member name="F:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint.expected"> | |
|
9284 | <summary> | |
|
9285 | The value against which a comparison is to be made | |
|
9286 | </summary> | |
|
9287 | </member> | |
|
9288 | <member name="M:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint.#ctor(System.Object)"> | |
|
9289 | <summary> | |
|
9290 | Initializes a new instance of the <see cref="T:GreaterThanOrEqualConstraint"/> class. | |
|
9291 | </summary> | |
|
9292 | <param name="expected">The expected value.</param> | |
|
9293 | </member> | |
|
9294 | <member name="M:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9295 | <summary> | |
|
9296 | Write the constraint description to a MessageWriter | |
|
9297 | </summary> | |
|
9298 | <param name="writer">The writer on which the description is displayed</param> | |
|
9299 | </member> | |
|
9300 | <member name="M:NUnit.Framework.Constraints.GreaterThanOrEqualConstraint.Matches(System.Object)"> | |
|
9301 | <summary> | |
|
9302 | Test whether the constraint is satisfied by a given value | |
|
9303 | </summary> | |
|
9304 | <param name="actual">The value to be tested</param> | |
|
9305 | <returns>True for success, false for failure</returns> | |
|
9306 | </member> | |
|
9307 | <member name="T:NUnit.Framework.Constraints.InstanceOfTypeConstraint"> | |
|
9308 | <summary> | |
|
9309 | InstanceOfTypeConstraint is used to test that an object | |
|
9310 | is of the same type provided or derived from it. | |
|
9311 | </summary> | |
|
9312 | </member> | |
|
9313 | <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.#ctor(System.Type)"> | |
|
9314 | <summary> | |
|
9315 | Construct an InstanceOfTypeConstraint for the type provided | |
|
9316 | </summary> | |
|
9317 | <param name="type">The expected Type</param> | |
|
9318 | </member> | |
|
9319 | <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.Matches(System.Object)"> | |
|
9320 | <summary> | |
|
9321 | Test whether an object is of the specified type or a derived type | |
|
9322 | </summary> | |
|
9323 | <param name="actual">The object to be tested</param> | |
|
9324 | <returns>True if the object is of the provided type or derives from it, otherwise false.</returns> | |
|
9325 | </member> | |
|
9326 | <member name="M:NUnit.Framework.Constraints.InstanceOfTypeConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9327 | <summary> | |
|
9328 | Write a description of this constraint to a MessageWriter | |
|
9329 | </summary> | |
|
9330 | <param name="writer">The MessageWriter to use</param> | |
|
9331 | </member> | |
|
9332 | <member name="T:NUnit.Framework.Constraints.LessThanConstraint"> | |
|
9333 | <summary> | |
|
9334 | Tests whether a value is less than the value supplied to its constructor | |
|
9335 | </summary> | |
|
9336 | </member> | |
|
9337 | <member name="F:NUnit.Framework.Constraints.LessThanConstraint.expected"> | |
|
9338 | <summary> | |
|
9339 | The value against which a comparison is to be made | |
|
9340 | </summary> | |
|
9341 | </member> | |
|
9342 | <member name="M:NUnit.Framework.Constraints.LessThanConstraint.#ctor(System.Object)"> | |
|
9343 | <summary> | |
|
9344 | Initializes a new instance of the <see cref="T:LessThanConstraint"/> class. | |
|
9345 | </summary> | |
|
9346 | <param name="expected">The expected value.</param> | |
|
9347 | </member> | |
|
9348 | <member name="M:NUnit.Framework.Constraints.LessThanConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9349 | <summary> | |
|
9350 | Write the constraint description to a MessageWriter | |
|
9351 | </summary> | |
|
9352 | <param name="writer">The writer on which the description is displayed</param> | |
|
9353 | </member> | |
|
9354 | <member name="M:NUnit.Framework.Constraints.LessThanConstraint.Matches(System.Object)"> | |
|
9355 | <summary> | |
|
9356 | Test whether the constraint is satisfied by a given value | |
|
9357 | </summary> | |
|
9358 | <param name="actual">The value to be tested</param> | |
|
9359 | <returns>True for success, false for failure</returns> | |
|
9360 | </member> | |
|
9361 | <member name="T:NUnit.Framework.Constraints.LessThanOrEqualConstraint"> | |
|
9362 | <summary> | |
|
9363 | Tests whether a value is less than or equal to the value supplied to its constructor | |
|
9364 | </summary> | |
|
9365 | </member> | |
|
9366 | <member name="F:NUnit.Framework.Constraints.LessThanOrEqualConstraint.expected"> | |
|
9367 | <summary> | |
|
9368 | The value against which a comparison is to be made | |
|
9369 | </summary> | |
|
9370 | </member> | |
|
9371 | <member name="M:NUnit.Framework.Constraints.LessThanOrEqualConstraint.#ctor(System.Object)"> | |
|
9372 | <summary> | |
|
9373 | Initializes a new instance of the <see cref="T:LessThanOrEqualConstraint"/> class. | |
|
9374 | </summary> | |
|
9375 | <param name="expected">The expected value.</param> | |
|
9376 | </member> | |
|
9377 | <member name="M:NUnit.Framework.Constraints.LessThanOrEqualConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9378 | <summary> | |
|
9379 | Write the constraint description to a MessageWriter | |
|
9380 | </summary> | |
|
9381 | <param name="writer">The writer on which the description is displayed</param> | |
|
9382 | </member> | |
|
9383 | <member name="M:NUnit.Framework.Constraints.LessThanOrEqualConstraint.Matches(System.Object)"> | |
|
9384 | <summary> | |
|
9385 | Test whether the constraint is satisfied by a given value | |
|
9386 | </summary> | |
|
9387 | <param name="actual">The value to be tested</param> | |
|
9388 | <returns>True for success, false for failure</returns> | |
|
9389 | </member> | |
|
9390 | <member name="T:NUnit.Framework.Constraints.MsgUtils"> | |
|
9391 | <summary> | |
|
9392 | Static methods used in creating messages | |
|
9393 | </summary> | |
|
9394 | </member> | |
|
9395 | <member name="F:NUnit.Framework.Constraints.MsgUtils.ELLIPSIS"> | |
|
9396 | <summary> | |
|
9397 | Static string used when strings are clipped | |
|
9398 | </summary> | |
|
9399 | </member> | |
|
9400 | <member name="M:NUnit.Framework.Constraints.MsgUtils.GetTypeRepresentation(System.Object)"> | |
|
9401 | <summary> | |
|
9402 | Returns the representation of a type as used in NUnitLite. | |
|
9403 | This is the same as Type.ToString() except for arrays, | |
|
9404 | which are displayed with their declared sizes. | |
|
9405 | </summary> | |
|
9406 | <param name="obj"></param> | |
|
9407 | <returns></returns> | |
|
9408 | </member> | |
|
9409 | <member name="M:NUnit.Framework.Constraints.MsgUtils.EscapeControlChars(System.String)"> | |
|
9410 | <summary> | |
|
9411 | Converts any control characters in a string | |
|
9412 | to their escaped representation. | |
|
9413 | </summary> | |
|
9414 | <param name="s">The string to be converted</param> | |
|
9415 | <returns>The converted string</returns> | |
|
9416 | </member> | |
|
9417 | <member name="M:NUnit.Framework.Constraints.MsgUtils.GetArrayIndicesAsString(System.Int32[])"> | |
|
9418 | <summary> | |
|
9419 | Return the a string representation for a set of indices into an array | |
|
9420 | </summary> | |
|
9421 | <param name="indices">Array of indices for which a string is needed</param> | |
|
9422 | </member> | |
|
9423 | <member name="M:NUnit.Framework.Constraints.MsgUtils.GetArrayIndicesFromCollectionIndex(System.Collections.IEnumerable,System.Int32)"> | |
|
9424 | <summary> | |
|
9425 | Get an array of indices representing the point in a enumerable, | |
|
9426 | collection or array corresponding to a single int index into the | |
|
9427 | collection. | |
|
9428 | </summary> | |
|
9429 | <param name="collection">The collection to which the indices apply</param> | |
|
9430 | <param name="index">Index in the collection</param> | |
|
9431 | <returns>Array of indices</returns> | |
|
9432 | </member> | |
|
9433 | <member name="M:NUnit.Framework.Constraints.MsgUtils.ClipString(System.String,System.Int32,System.Int32)"> | |
|
9434 | <summary> | |
|
9435 | Clip a string to a given length, starting at a particular offset, returning the clipped | |
|
9436 | string with ellipses representing the removed parts | |
|
9437 | </summary> | |
|
9438 | <param name="s">The string to be clipped</param> | |
|
9439 | <param name="maxStringLength">The maximum permitted length of the result string</param> | |
|
9440 | <param name="clipStart">The point at which to start clipping</param> | |
|
9441 | <returns>The clipped string</returns> | |
|
9442 | </member> | |
|
9443 | <member name="M:NUnit.Framework.Constraints.MsgUtils.ClipExpectedAndActual(System.String@,System.String@,System.Int32,System.Int32)"> | |
|
9444 | <summary> | |
|
9445 | Clip the expected and actual strings in a coordinated fashion, | |
|
9446 | so that they may be displayed together. | |
|
9447 | </summary> | |
|
9448 | <param name="expected"></param> | |
|
9449 | <param name="actual"></param> | |
|
9450 | <param name="maxDisplayLength"></param> | |
|
9451 | <param name="mismatch"></param> | |
|
9452 | </member> | |
|
9453 | <member name="M:NUnit.Framework.Constraints.MsgUtils.FindMismatchPosition(System.String,System.String,System.Int32,System.Boolean)"> | |
|
9454 | <summary> | |
|
9455 | Shows the position two strings start to differ. Comparison | |
|
9456 | starts at the start index. | |
|
9457 | </summary> | |
|
9458 | <param name="expected">The expected string</param> | |
|
9459 | <param name="actual">The actual string</param> | |
|
9460 | <param name="istart">The index in the strings at which comparison should start</param> | |
|
9461 | <param name="ignoreCase">Boolean indicating whether case should be ignored</param> | |
|
9462 | <returns>-1 if no mismatch found, or the index where mismatch found</returns> | |
|
9463 | </member> | |
|
9464 | <member name="T:NUnit.Framework.Constraints.NaNConstraint"> | |
|
9465 | <summary> | |
|
9466 | NaNConstraint tests that the actual value is a double or float NaN | |
|
9467 | </summary> | |
|
9468 | </member> | |
|
9469 | <member name="M:NUnit.Framework.Constraints.NaNConstraint.Matches(System.Object)"> | |
|
9470 | <summary> | |
|
9471 | Test that the actual value is an NaN | |
|
9472 | </summary> | |
|
9473 | <param name="actual"></param> | |
|
9474 | <returns></returns> | |
|
9475 | </member> | |
|
9476 | <member name="M:NUnit.Framework.Constraints.NaNConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9477 | <summary> | |
|
9478 | Write the constraint description to a specified writer | |
|
9479 | </summary> | |
|
9480 | <param name="writer"></param> | |
|
9481 | </member> | |
|
9482 | <member name="T:NUnit.Framework.Constraints.NoItemConstraint"> | |
|
9483 | <summary> | |
|
9484 | NoItemConstraint applies another constraint to each | |
|
9485 | item in a collection, failing if any of them succeeds. | |
|
9486 | </summary> | |
|
9487 | </member> | |
|
9488 | <member name="M:NUnit.Framework.Constraints.NoItemConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> | |
|
9489 | <summary> | |
|
9490 | Construct a NoItemConstraint on top of an existing constraint | |
|
9491 | </summary> | |
|
9492 | <param name="itemConstraint"></param> | |
|
9493 | </member> | |
|
9494 | <member name="M:NUnit.Framework.Constraints.NoItemConstraint.Matches(System.Object)"> | |
|
9495 | <summary> | |
|
9496 | Apply the item constraint to each item in the collection, | |
|
9497 | failing if any item fails. | |
|
9498 | </summary> | |
|
9499 | <param name="actual"></param> | |
|
9500 | <returns></returns> | |
|
9501 | </member> | |
|
9502 | <member name="M:NUnit.Framework.Constraints.NoItemConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9503 | <summary> | |
|
9504 | Write a description of this constraint to a MessageWriter | |
|
9505 | </summary> | |
|
9506 | <param name="writer"></param> | |
|
9507 | </member> | |
|
9508 | <member name="T:NUnit.Framework.Constraints.NotConstraint"> | |
|
9509 | <summary> | |
|
9510 | NotConstraint negates the effect of some other constraint | |
|
9511 | </summary> | |
|
9512 | </member> | |
|
9513 | <member name="M:NUnit.Framework.Constraints.NotConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> | |
|
9514 | <summary> | |
|
9515 | Initializes a new instance of the <see cref="T:NUnit.Framework.Constraints.NotConstraint"/> class. | |
|
9516 | </summary> | |
|
9517 | <param name="baseConstraint">The base constraint to be negated.</param> | |
|
9518 | </member> | |
|
9519 | <member name="M:NUnit.Framework.Constraints.NotConstraint.Matches(System.Object)"> | |
|
9520 | <summary> | |
|
9521 | Test whether the constraint is satisfied by a given value | |
|
9522 | </summary> | |
|
9523 | <param name="actual">The value to be tested</param> | |
|
9524 | <returns>True for if the base constraint fails, false if it succeeds</returns> | |
|
9525 | </member> | |
|
9526 | <member name="M:NUnit.Framework.Constraints.NotConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9527 | <summary> | |
|
9528 | Write the constraint description to a MessageWriter | |
|
9529 | </summary> | |
|
9530 | <param name="writer">The writer on which the description is displayed</param> | |
|
9531 | </member> | |
|
9532 | <member name="M:NUnit.Framework.Constraints.NotConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9533 | <summary> | |
|
9534 | Write the actual value for a failing constraint test to a MessageWriter. | |
|
9535 | </summary> | |
|
9536 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
9537 | </member> | |
|
9538 | <member name="T:NUnit.Framework.Constraints.NullConstraint"> | |
|
9539 | <summary> | |
|
9540 | NullConstraint tests that the actual value is null | |
|
9541 | </summary> | |
|
9542 | </member> | |
|
9543 | <member name="M:NUnit.Framework.Constraints.NullConstraint.#ctor"> | |
|
9544 | <summary> | |
|
9545 | Initializes a new instance of the <see cref="T:NullConstraint"/> class. | |
|
9546 | </summary> | |
|
9547 | </member> | |
|
9548 | <member name="T:NUnit.Framework.Constraints.NullOrEmptyStringConstraint"> | |
|
9549 | <summary> | |
|
9550 | NullEmptyStringConstraint tests whether a string is either null or empty. | |
|
9551 | </summary> | |
|
9552 | </member> | |
|
9553 | <member name="M:NUnit.Framework.Constraints.NullOrEmptyStringConstraint.#ctor"> | |
|
9554 | <summary> | |
|
9555 | Constructs a new NullOrEmptyStringConstraint | |
|
9556 | </summary> | |
|
9557 | </member> | |
|
9558 | <member name="M:NUnit.Framework.Constraints.NullOrEmptyStringConstraint.Matches(System.Object)"> | |
|
9559 | <summary> | |
|
9560 | Test whether the constraint is satisfied by a given value | |
|
9561 | </summary> | |
|
9562 | <param name="actual">The value to be tested</param> | |
|
9563 | <returns>True for success, false for failure</returns> | |
|
9564 | </member> | |
|
9565 | <member name="M:NUnit.Framework.Constraints.NullOrEmptyStringConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9566 | <summary> | |
|
9567 | Write the constraint description to a MessageWriter | |
|
9568 | </summary> | |
|
9569 | <param name="writer">The writer on which the description is displayed</param> | |
|
9570 | </member> | |
|
9571 | <member name="T:NUnit.Framework.Constraints.Numerics"> | |
|
9572 | <summary> | |
|
9573 | The Numerics class contains common operations on numeric values. | |
|
9574 | </summary> | |
|
9575 | </member> | |
|
9576 | <member name="M:NUnit.Framework.Constraints.Numerics.IsNumericType(System.Object)"> | |
|
9577 | <summary> | |
|
9578 | Checks the type of the object, returning true if | |
|
9579 | the object is a numeric type. | |
|
9580 | </summary> | |
|
9581 | <param name="obj">The object to check</param> | |
|
9582 | <returns>true if the object is a numeric type</returns> | |
|
9583 | </member> | |
|
9584 | <member name="M:NUnit.Framework.Constraints.Numerics.IsFloatingPointNumeric(System.Object)"> | |
|
9585 | <summary> | |
|
9586 | Checks the type of the object, returning true if | |
|
9587 | the object is a floating point numeric type. | |
|
9588 | </summary> | |
|
9589 | <param name="obj">The object to check</param> | |
|
9590 | <returns>true if the object is a floating point numeric type</returns> | |
|
9591 | </member> | |
|
9592 | <member name="M:NUnit.Framework.Constraints.Numerics.IsFixedPointNumeric(System.Object)"> | |
|
9593 | <summary> | |
|
9594 | Checks the type of the object, returning true if | |
|
9595 | the object is a fixed point numeric type. | |
|
9596 | </summary> | |
|
9597 | <param name="obj">The object to check</param> | |
|
9598 | <returns>true if the object is a fixed point numeric type</returns> | |
|
9599 | </member> | |
|
9600 | <member name="M:NUnit.Framework.Constraints.Numerics.AreEqual(System.Object,System.Object,NUnit.Framework.Constraints.Tolerance@)"> | |
|
9601 | <summary> | |
|
9602 | Test two numeric values for equality, performing the usual numeric | |
|
9603 | conversions and using a provided or default tolerance. If the tolerance | |
|
9604 | provided is Empty, this method may set it to a default tolerance. | |
|
9605 | </summary> | |
|
9606 | <param name="expected">The expected value</param> | |
|
9607 | <param name="actual">The actual value</param> | |
|
9608 | <param name="tolerance">A reference to the tolerance in effect</param> | |
|
9609 | <returns>True if the values are equal</returns> | |
|
9610 | </member> | |
|
9611 | <member name="M:NUnit.Framework.Constraints.Numerics.Compare(System.Object,System.Object)"> | |
|
9612 | <summary> | |
|
9613 | Compare two numeric values, performing the usual numeric conversions. | |
|
9614 | </summary> | |
|
9615 | <param name="expected">The expected value</param> | |
|
9616 | <param name="actual">The actual value</param> | |
|
9617 | <returns>The relationship of the values to each other</returns> | |
|
9618 | </member> | |
|
9619 | <member name="T:NUnit.Framework.Constraints.NUnitComparer"> | |
|
9620 | <summary> | |
|
9621 | NUnitComparer encapsulates NUnit's default behavior | |
|
9622 | in comparing two objects. | |
|
9623 | </summary> | |
|
9624 | </member> | |
|
9625 | <member name="M:NUnit.Framework.Constraints.NUnitComparer.Compare(System.Object,System.Object)"> | |
|
9626 | <summary> | |
|
9627 | Compares two objects | |
|
9628 | </summary> | |
|
9629 | <param name="x"></param> | |
|
9630 | <param name="y"></param> | |
|
9631 | <returns></returns> | |
|
9632 | </member> | |
|
9633 | <member name="P:NUnit.Framework.Constraints.NUnitComparer.Default"> | |
|
9634 | <summary> | |
|
9635 | Returns the default NUnitComparer. | |
|
9636 | </summary> | |
|
9637 | </member> | |
|
9638 | <member name="T:NUnit.Framework.Constraints.NUnitComparer`1"> | |
|
9639 | <summary> | |
|
9640 | Generic version of NUnitComparer | |
|
9641 | </summary> | |
|
9642 | <typeparam name="T"></typeparam> | |
|
9643 | </member> | |
|
9644 | <member name="M:NUnit.Framework.Constraints.NUnitComparer`1.Compare(`0,`0)"> | |
|
9645 | <summary> | |
|
9646 | Compare two objects of the same type | |
|
9647 | </summary> | |
|
9648 | </member> | |
|
9649 | <member name="T:NUnit.Framework.Constraints.NUnitEqualityComparer"> | |
|
9650 | <summary> | |
|
9651 | NUnitEqualityComparer encapsulates NUnit's handling of | |
|
9652 | equality tests between objects. | |
|
9653 | </summary> | |
|
9654 | </member> | |
|
9655 | <member name="T:NUnit.Framework.INUnitEqualityComparer"> | |
|
9656 | <summary> | |
|
9657 | ||
|
9658 | </summary> | |
|
9659 | </member> | |
|
9660 | <member name="M:NUnit.Framework.INUnitEqualityComparer.AreEqual(System.Object,System.Object,NUnit.Framework.Constraints.Tolerance@)"> | |
|
9661 | <summary> | |
|
9662 | Compares two objects for equality within a tolerance | |
|
9663 | </summary> | |
|
9664 | <param name="x">The first object to compare</param> | |
|
9665 | <param name="y">The second object to compare</param> | |
|
9666 | <param name="tolerance">The tolerance to use in the comparison</param> | |
|
9667 | <returns></returns> | |
|
9668 | </member> | |
|
9669 | <member name="F:NUnit.Framework.Constraints.NUnitEqualityComparer.caseInsensitive"> | |
|
9670 | <summary> | |
|
9671 | If true, all string comparisons will ignore case | |
|
9672 | </summary> | |
|
9673 | </member> | |
|
9674 | <member name="F:NUnit.Framework.Constraints.NUnitEqualityComparer.compareAsCollection"> | |
|
9675 | <summary> | |
|
9676 | If true, arrays will be treated as collections, allowing | |
|
9677 | those of different dimensions to be compared | |
|
9678 | </summary> | |
|
9679 | </member> | |
|
9680 | <member name="F:NUnit.Framework.Constraints.NUnitEqualityComparer.externalComparers"> | |
|
9681 | <summary> | |
|
9682 | Comparison objects used in comparisons for some constraints. | |
|
9683 | </summary> | |
|
9684 | </member> | |
|
9685 | <member name="F:NUnit.Framework.Constraints.NUnitEqualityComparer.failurePoints"> | |
|
9686 | <summary> | |
|
9687 | List of points at which a failure occured. | |
|
9688 | </summary> | |
|
9689 | </member> | |
|
9690 | <member name="F:NUnit.Framework.Constraints.NUnitEqualityComparer.recursionDetector"> | |
|
9691 | <summary> | |
|
9692 | RecursionDetector used to check for recursion when | |
|
9693 | evaluating self-referencing enumerables. | |
|
9694 | </summary> | |
|
9695 | </member> | |
|
9696 | <member name="M:NUnit.Framework.Constraints.NUnitEqualityComparer.AreEqual(System.Object,System.Object,NUnit.Framework.Constraints.Tolerance@)"> | |
|
9697 | <summary> | |
|
9698 | Compares two objects for equality within a tolerance, setting | |
|
9699 | the tolerance to the actual tolerance used if an empty | |
|
9700 | tolerance is supplied. | |
|
9701 | </summary> | |
|
9702 | </member> | |
|
9703 | <member name="M:NUnit.Framework.Constraints.NUnitEqualityComparer.ArraysEqual(System.Array,System.Array,NUnit.Framework.Constraints.Tolerance@)"> | |
|
9704 | <summary> | |
|
9705 | Helper method to compare two arrays | |
|
9706 | </summary> | |
|
9707 | </member> | |
|
9708 | <member name="M:NUnit.Framework.Constraints.NUnitEqualityComparer.DirectoriesEqual(System.IO.DirectoryInfo,System.IO.DirectoryInfo)"> | |
|
9709 | <summary> | |
|
9710 | Method to compare two DirectoryInfo objects | |
|
9711 | </summary> | |
|
9712 | <param name="expected">first directory to compare</param> | |
|
9713 | <param name="actual">second directory to compare</param> | |
|
9714 | <returns>true if equivalent, false if not</returns> | |
|
9715 | </member> | |
|
9716 | <member name="P:NUnit.Framework.Constraints.NUnitEqualityComparer.Default"> | |
|
9717 | <summary> | |
|
9718 | Returns the default NUnitEqualityComparer | |
|
9719 | </summary> | |
|
9720 | </member> | |
|
9721 | <member name="P:NUnit.Framework.Constraints.NUnitEqualityComparer.IgnoreCase"> | |
|
9722 | <summary> | |
|
9723 | Gets and sets a flag indicating whether case should | |
|
9724 | be ignored in determining equality. | |
|
9725 | </summary> | |
|
9726 | </member> | |
|
9727 | <member name="P:NUnit.Framework.Constraints.NUnitEqualityComparer.CompareAsCollection"> | |
|
9728 | <summary> | |
|
9729 | Gets and sets a flag indicating that arrays should be | |
|
9730 | compared as collections, without regard to their shape. | |
|
9731 | </summary> | |
|
9732 | </member> | |
|
9733 | <member name="P:NUnit.Framework.Constraints.NUnitEqualityComparer.ExternalComparers"> | |
|
9734 | <summary> | |
|
9735 | Gets the list of external comparers to be used to | |
|
9736 | test for equality. They are applied to members of | |
|
9737 | collections, in place of NUnit's own logic. | |
|
9738 | </summary> | |
|
9739 | </member> | |
|
9740 | <member name="P:NUnit.Framework.Constraints.NUnitEqualityComparer.FailurePoints"> | |
|
9741 | <summary> | |
|
9742 | Gets the list of failure points for the last Match performed. | |
|
9743 | The list consists of objects to be interpreted by the caller. | |
|
9744 | This generally means that the caller may only make use of | |
|
9745 | objects it has placed on the list at a particular depthy. | |
|
9746 | </summary> | |
|
9747 | </member> | |
|
9748 | <member name="T:NUnit.Framework.Constraints.NUnitEqualityComparer.RecursionDetector"> | |
|
9749 | <summary> | |
|
9750 | RecursionDetector detects when a comparison | |
|
9751 | between two enumerables has reached a point | |
|
9752 | where the same objects that were previously | |
|
9753 | compared are again being compared. This allows | |
|
9754 | the caller to stop the comparison if desired. | |
|
9755 | </summary> | |
|
9756 | </member> | |
|
9757 | <member name="M:NUnit.Framework.Constraints.NUnitEqualityComparer.RecursionDetector.CheckRecursion(System.Collections.IEnumerable,System.Collections.IEnumerable)"> | |
|
9758 | <summary> | |
|
9759 | Check whether two objects have previously | |
|
9760 | been compared, returning true if they have. | |
|
9761 | The two objects are remembered, so that a | |
|
9762 | second call will always return true. | |
|
9763 | </summary> | |
|
9764 | </member> | |
|
9765 | <member name="T:NUnit.Framework.Constraints.OrConstraint"> | |
|
9766 | <summary> | |
|
9767 | OrConstraint succeeds if either member succeeds | |
|
9768 | </summary> | |
|
9769 | </member> | |
|
9770 | <member name="M:NUnit.Framework.Constraints.OrConstraint.#ctor(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> | |
|
9771 | <summary> | |
|
9772 | Create an OrConstraint from two other constraints | |
|
9773 | </summary> | |
|
9774 | <param name="left">The first constraint</param> | |
|
9775 | <param name="right">The second constraint</param> | |
|
9776 | </member> | |
|
9777 | <member name="M:NUnit.Framework.Constraints.OrConstraint.Matches(System.Object)"> | |
|
9778 | <summary> | |
|
9779 | Apply the member constraints to an actual value, succeeding | |
|
9780 | succeeding as soon as one of them succeeds. | |
|
9781 | </summary> | |
|
9782 | <param name="actual">The actual value</param> | |
|
9783 | <returns>True if either constraint succeeded</returns> | |
|
9784 | </member> | |
|
9785 | <member name="M:NUnit.Framework.Constraints.OrConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9786 | <summary> | |
|
9787 | Write a description for this contraint to a MessageWriter | |
|
9788 | </summary> | |
|
9789 | <param name="writer">The MessageWriter to receive the description</param> | |
|
9790 | </member> | |
|
9791 | <member name="T:NUnit.Framework.Constraints.PathConstraint"> | |
|
9792 | <summary> | |
|
9793 | PathConstraint serves as the abstract base of constraints | |
|
9794 | that operate on paths and provides several helper methods. | |
|
9795 | </summary> | |
|
9796 | </member> | |
|
9797 | <member name="F:NUnit.Framework.Constraints.PathConstraint.expectedPath"> | |
|
9798 | <summary> | |
|
9799 | The expected path used in the constraint | |
|
9800 | </summary> | |
|
9801 | </member> | |
|
9802 | <member name="F:NUnit.Framework.Constraints.PathConstraint.caseInsensitive"> | |
|
9803 | <summary> | |
|
9804 | Flag indicating whether a caseInsensitive comparison should be made | |
|
9805 | </summary> | |
|
9806 | </member> | |
|
9807 | <member name="M:NUnit.Framework.Constraints.PathConstraint.#ctor(System.String)"> | |
|
9808 | <summary> | |
|
9809 | Construct a PathConstraint for a give expected path | |
|
9810 | </summary> | |
|
9811 | <param name="expectedPath">The expected path</param> | |
|
9812 | </member> | |
|
9813 | <member name="M:NUnit.Framework.Constraints.PathConstraint.Matches(System.Object)"> | |
|
9814 | <summary> | |
|
9815 | Test whether the constraint is satisfied by a given value | |
|
9816 | </summary> | |
|
9817 | <param name="actual">The value to be tested</param> | |
|
9818 | <returns>True for success, false for failure</returns> | |
|
9819 | </member> | |
|
9820 | <member name="M:NUnit.Framework.Constraints.PathConstraint.IsMatch(System.String,System.String)"> | |
|
9821 | <summary> | |
|
9822 | Returns true if the expected path and actual path match | |
|
9823 | </summary> | |
|
9824 | </member> | |
|
9825 | <member name="M:NUnit.Framework.Constraints.PathConstraint.GetStringRepresentation"> | |
|
9826 | <summary> | |
|
9827 | Returns the string representation of this constraint | |
|
9828 | </summary> | |
|
9829 | </member> | |
|
9830 | <member name="M:NUnit.Framework.Constraints.PathConstraint.Canonicalize(System.String)"> | |
|
9831 | <summary> | |
|
9832 | Transform the provided path to its canonical form so that it | |
|
9833 | may be more easily be compared with other paths. | |
|
9834 | </summary> | |
|
9835 | <param name="path">The original path</param> | |
|
9836 | <returns>The path in canonical form</returns> | |
|
9837 | </member> | |
|
9838 | <member name="M:NUnit.Framework.Constraints.PathConstraint.IsSubPath(System.String,System.String,System.Boolean)"> | |
|
9839 | <summary> | |
|
9840 | Test whether one path in canonical form is under another. | |
|
9841 | </summary> | |
|
9842 | <param name="path1">The first path - supposed to be the parent path</param> | |
|
9843 | <param name="path2">The second path - supposed to be the child path</param> | |
|
9844 | <param name="ignoreCase">Indicates whether case should be ignored</param> | |
|
9845 | <returns></returns> | |
|
9846 | </member> | |
|
9847 | <member name="P:NUnit.Framework.Constraints.PathConstraint.IgnoreCase"> | |
|
9848 | <summary> | |
|
9849 | Modifies the current instance to be case-insensitve | |
|
9850 | and returns it. | |
|
9851 | </summary> | |
|
9852 | </member> | |
|
9853 | <member name="P:NUnit.Framework.Constraints.PathConstraint.RespectCase"> | |
|
9854 | <summary> | |
|
9855 | Modifies the current instance to be case-sensitve | |
|
9856 | and returns it. | |
|
9857 | </summary> | |
|
9858 | </member> | |
|
9859 | <member name="T:NUnit.Framework.Constraints.PredicateConstraint`1"> | |
|
9860 | <summary> | |
|
9861 | Predicate constraint wraps a Predicate in a constraint, | |
|
9862 | returning success if the predicate is true. | |
|
9863 | </summary> | |
|
9864 | </member> | |
|
9865 | <member name="M:NUnit.Framework.Constraints.PredicateConstraint`1.#ctor(System.Predicate{`0})"> | |
|
9866 | <summary> | |
|
9867 | Construct a PredicateConstraint from a predicate | |
|
9868 | </summary> | |
|
9869 | </member> | |
|
9870 | <member name="M:NUnit.Framework.Constraints.PredicateConstraint`1.Matches(System.Object)"> | |
|
9871 | <summary> | |
|
9872 | Determines whether the predicate succeeds when applied | |
|
9873 | to the actual value. | |
|
9874 | </summary> | |
|
9875 | </member> | |
|
9876 | <member name="M:NUnit.Framework.Constraints.PredicateConstraint`1.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9877 | <summary> | |
|
9878 | Writes the description to a MessageWriter | |
|
9879 | </summary> | |
|
9880 | </member> | |
|
9881 | <member name="T:NUnit.Framework.Constraints.PropertyConstraint"> | |
|
9882 | <summary> | |
|
9883 | PropertyConstraint extracts a named property and uses | |
|
9884 | its value as the actual value for a chained constraint. | |
|
9885 | </summary> | |
|
9886 | </member> | |
|
9887 | <member name="M:NUnit.Framework.Constraints.PropertyConstraint.#ctor(System.String,NUnit.Framework.Constraints.Constraint)"> | |
|
9888 | <summary> | |
|
9889 | Initializes a new instance of the <see cref="T:PropertyConstraint"/> class. | |
|
9890 | </summary> | |
|
9891 | <param name="name">The name.</param> | |
|
9892 | <param name="baseConstraint">The constraint to apply to the property.</param> | |
|
9893 | </member> | |
|
9894 | <member name="M:NUnit.Framework.Constraints.PropertyConstraint.Matches(System.Object)"> | |
|
9895 | <summary> | |
|
9896 | Test whether the constraint is satisfied by a given value | |
|
9897 | </summary> | |
|
9898 | <param name="actual">The value to be tested</param> | |
|
9899 | <returns>True for success, false for failure</returns> | |
|
9900 | </member> | |
|
9901 | <member name="M:NUnit.Framework.Constraints.PropertyConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9902 | <summary> | |
|
9903 | Write the constraint description to a MessageWriter | |
|
9904 | </summary> | |
|
9905 | <param name="writer">The writer on which the description is displayed</param> | |
|
9906 | </member> | |
|
9907 | <member name="M:NUnit.Framework.Constraints.PropertyConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9908 | <summary> | |
|
9909 | Write the actual value for a failing constraint test to a | |
|
9910 | MessageWriter. The default implementation simply writes | |
|
9911 | the raw value of actual, leaving it to the writer to | |
|
9912 | perform any formatting. | |
|
9913 | </summary> | |
|
9914 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
9915 | </member> | |
|
9916 | <member name="M:NUnit.Framework.Constraints.PropertyConstraint.GetStringRepresentation"> | |
|
9917 | <summary> | |
|
9918 | Returns the string representation of the constraint. | |
|
9919 | </summary> | |
|
9920 | <returns></returns> | |
|
9921 | </member> | |
|
9922 | <member name="T:NUnit.Framework.Constraints.PropertyExistsConstraint"> | |
|
9923 | <summary> | |
|
9924 | PropertyExistsConstraint tests that a named property | |
|
9925 | exists on the object provided through Match. | |
|
9926 | ||
|
9927 | Originally, PropertyConstraint provided this feature | |
|
9928 | in addition to making optional tests on the vaue | |
|
9929 | of the property. The two constraints are now separate. | |
|
9930 | </summary> | |
|
9931 | </member> | |
|
9932 | <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.#ctor(System.String)"> | |
|
9933 | <summary> | |
|
9934 | Initializes a new instance of the <see cref="T:PropertyExistConstraint"/> class. | |
|
9935 | </summary> | |
|
9936 | <param name="name">The name of the property.</param> | |
|
9937 | </member> | |
|
9938 | <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.Matches(System.Object)"> | |
|
9939 | <summary> | |
|
9940 | Test whether the property exists for a given object | |
|
9941 | </summary> | |
|
9942 | <param name="actual">The object to be tested</param> | |
|
9943 | <returns>True for success, false for failure</returns> | |
|
9944 | </member> | |
|
9945 | <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9946 | <summary> | |
|
9947 | Write the constraint description to a MessageWriter | |
|
9948 | </summary> | |
|
9949 | <param name="writer">The writer on which the description is displayed</param> | |
|
9950 | </member> | |
|
9951 | <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9952 | <summary> | |
|
9953 | Write the actual value for a failing constraint test to a | |
|
9954 | MessageWriter. | |
|
9955 | </summary> | |
|
9956 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
9957 | </member> | |
|
9958 | <member name="M:NUnit.Framework.Constraints.PropertyExistsConstraint.GetStringRepresentation"> | |
|
9959 | <summary> | |
|
9960 | Returns the string representation of the constraint. | |
|
9961 | </summary> | |
|
9962 | <returns></returns> | |
|
9963 | </member> | |
|
9964 | <member name="T:NUnit.Framework.Constraints.RangeConstraint`1"> | |
|
9965 | <summary> | |
|
9966 | RangeConstraint tests whether two values are within a | |
|
9967 | specified range. | |
|
9968 | </summary> | |
|
9969 | </member> | |
|
9970 | <member name="M:NUnit.Framework.Constraints.RangeConstraint`1.#ctor(`0,`0)"> | |
|
9971 | <summary> | |
|
9972 | Initializes a new instance of the <see cref="T:RangeConstraint"/> class. | |
|
9973 | </summary> | |
|
9974 | <param name="from">From.</param> | |
|
9975 | <param name="to">To.</param> | |
|
9976 | </member> | |
|
9977 | <member name="M:NUnit.Framework.Constraints.RangeConstraint`1.Matches(System.Object)"> | |
|
9978 | <summary> | |
|
9979 | Test whether the constraint is satisfied by a given value | |
|
9980 | </summary> | |
|
9981 | <param name="actual">The value to be tested</param> | |
|
9982 | <returns>True for success, false for failure</returns> | |
|
9983 | </member> | |
|
9984 | <member name="M:NUnit.Framework.Constraints.RangeConstraint`1.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
9985 | <summary> | |
|
9986 | Write the constraint description to a MessageWriter | |
|
9987 | </summary> | |
|
9988 | <param name="writer">The writer on which the description is displayed</param> | |
|
9989 | </member> | |
|
9990 | <member name="T:NUnit.Framework.Constraints.RegexConstraint"> | |
|
9991 | <summary> | |
|
9992 | RegexConstraint can test whether a string matches | |
|
9993 | the pattern provided. | |
|
9994 | </summary> | |
|
9995 | </member> | |
|
9996 | <member name="M:NUnit.Framework.Constraints.RegexConstraint.#ctor(System.String)"> | |
|
9997 | <summary> | |
|
9998 | Initializes a new instance of the <see cref="T:RegexConstraint"/> class. | |
|
9999 | </summary> | |
|
10000 | <param name="pattern">The pattern.</param> | |
|
10001 | </member> | |
|
10002 | <member name="M:NUnit.Framework.Constraints.RegexConstraint.Matches(System.String)"> | |
|
10003 | <summary> | |
|
10004 | Test whether the constraint is satisfied by a given value | |
|
10005 | </summary> | |
|
10006 | <param name="actual">The value to be tested</param> | |
|
10007 | <returns>True for success, false for failure</returns> | |
|
10008 | </member> | |
|
10009 | <member name="M:NUnit.Framework.Constraints.RegexConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10010 | <summary> | |
|
10011 | Write the constraint description to a MessageWriter | |
|
10012 | </summary> | |
|
10013 | <param name="writer">The writer on which the description is displayed</param> | |
|
10014 | </member> | |
|
10015 | <member name="T:NUnit.Framework.Constraints.ResolvableConstraintExpression"> | |
|
10016 | <summary> | |
|
10017 | ResolvableConstraintExpression is used to represent a compound | |
|
10018 | constraint being constructed at a point where the last operator | |
|
10019 | may either terminate the expression or may have additional | |
|
10020 | qualifying constraints added to it. | |
|
10021 | ||
|
10022 | It is used, for example, for a Property element or for | |
|
10023 | an Exception element, either of which may be optionally | |
|
10024 | followed by constraints that apply to the property or | |
|
10025 | exception. | |
|
10026 | </summary> | |
|
10027 | </member> | |
|
10028 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.#ctor"> | |
|
10029 | <summary> | |
|
10030 | Create a new instance of ResolvableConstraintExpression | |
|
10031 | </summary> | |
|
10032 | </member> | |
|
10033 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.#ctor(NUnit.Framework.Constraints.ConstraintBuilder)"> | |
|
10034 | <summary> | |
|
10035 | Create a new instance of ResolvableConstraintExpression, | |
|
10036 | passing in a pre-populated ConstraintBuilder. | |
|
10037 | </summary> | |
|
10038 | </member> | |
|
10039 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.NUnit#Framework#Constraints#IResolveConstraint#Resolve"> | |
|
10040 | <summary> | |
|
10041 | Resolve the current expression to a Constraint | |
|
10042 | </summary> | |
|
10043 | </member> | |
|
10044 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.op_BitwiseAnd(NUnit.Framework.Constraints.ResolvableConstraintExpression,NUnit.Framework.Constraints.ResolvableConstraintExpression)"> | |
|
10045 | <summary> | |
|
10046 | This operator creates a constraint that is satisfied only if both | |
|
10047 | argument constraints are satisfied. | |
|
10048 | </summary> | |
|
10049 | </member> | |
|
10050 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.op_BitwiseAnd(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.ResolvableConstraintExpression)"> | |
|
10051 | <summary> | |
|
10052 | This operator creates a constraint that is satisfied only if both | |
|
10053 | argument constraints are satisfied. | |
|
10054 | </summary> | |
|
10055 | </member> | |
|
10056 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.op_BitwiseAnd(NUnit.Framework.Constraints.ResolvableConstraintExpression,NUnit.Framework.Constraints.Constraint)"> | |
|
10057 | <summary> | |
|
10058 | This operator creates a constraint that is satisfied only if both | |
|
10059 | argument constraints are satisfied. | |
|
10060 | </summary> | |
|
10061 | </member> | |
|
10062 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.op_BitwiseOr(NUnit.Framework.Constraints.ResolvableConstraintExpression,NUnit.Framework.Constraints.ResolvableConstraintExpression)"> | |
|
10063 | <summary> | |
|
10064 | This operator creates a constraint that is satisfied if either | |
|
10065 | of the argument constraints is satisfied. | |
|
10066 | </summary> | |
|
10067 | </member> | |
|
10068 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.op_BitwiseOr(NUnit.Framework.Constraints.ResolvableConstraintExpression,NUnit.Framework.Constraints.Constraint)"> | |
|
10069 | <summary> | |
|
10070 | This operator creates a constraint that is satisfied if either | |
|
10071 | of the argument constraints is satisfied. | |
|
10072 | </summary> | |
|
10073 | </member> | |
|
10074 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.op_BitwiseOr(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.ResolvableConstraintExpression)"> | |
|
10075 | <summary> | |
|
10076 | This operator creates a constraint that is satisfied if either | |
|
10077 | of the argument constraints is satisfied. | |
|
10078 | </summary> | |
|
10079 | </member> | |
|
10080 | <member name="M:NUnit.Framework.Constraints.ResolvableConstraintExpression.op_LogicalNot(NUnit.Framework.Constraints.ResolvableConstraintExpression)"> | |
|
10081 | <summary> | |
|
10082 | This operator creates a constraint that is satisfied if the | |
|
10083 | argument constraint is not satisfied. | |
|
10084 | </summary> | |
|
10085 | </member> | |
|
10086 | <member name="P:NUnit.Framework.Constraints.ResolvableConstraintExpression.And"> | |
|
10087 | <summary> | |
|
10088 | Appends an And Operator to the expression | |
|
10089 | </summary> | |
|
10090 | </member> | |
|
10091 | <member name="P:NUnit.Framework.Constraints.ResolvableConstraintExpression.Or"> | |
|
10092 | <summary> | |
|
10093 | Appends an Or operator to the expression. | |
|
10094 | </summary> | |
|
10095 | </member> | |
|
10096 | <member name="T:NUnit.Framework.Constraints.ReusableConstraint"> | |
|
10097 | <summary> | |
|
10098 | ReusableConstraint wraps a constraint expression after | |
|
10099 | resolving it so that it can be reused consistently. | |
|
10100 | </summary> | |
|
10101 | </member> | |
|
10102 | <member name="M:NUnit.Framework.Constraints.ReusableConstraint.#ctor(NUnit.Framework.Constraints.IResolveConstraint)"> | |
|
10103 | <summary> | |
|
10104 | Construct a ReusableConstraint from a constraint expression | |
|
10105 | </summary> | |
|
10106 | <param name="c">The expression to be resolved and reused</param> | |
|
10107 | </member> | |
|
10108 | <member name="M:NUnit.Framework.Constraints.ReusableConstraint.op_Implicit(NUnit.Framework.Constraints.Constraint)~NUnit.Framework.Constraints.ReusableConstraint"> | |
|
10109 | <summary> | |
|
10110 | Converts a constraint to a ReusableConstraint | |
|
10111 | </summary> | |
|
10112 | <param name="c">The constraint to be converted</param> | |
|
10113 | <returns>A ReusableConstraint</returns> | |
|
10114 | </member> | |
|
10115 | <member name="M:NUnit.Framework.Constraints.ReusableConstraint.ToString"> | |
|
10116 | <summary> | |
|
10117 | Returns the string representation of the constraint. | |
|
10118 | </summary> | |
|
10119 | <returns>A string representing the constraint</returns> | |
|
10120 | </member> | |
|
10121 | <member name="M:NUnit.Framework.Constraints.ReusableConstraint.Resolve"> | |
|
10122 | <summary> | |
|
10123 | Resolves the ReusableConstraint by returning the constraint | |
|
10124 | that it originally wrapped. | |
|
10125 | </summary> | |
|
10126 | <returns>A resolved constraint</returns> | |
|
10127 | </member> | |
|
10128 | <member name="T:NUnit.Framework.Constraints.SameAsConstraint"> | |
|
10129 | <summary> | |
|
10130 | SameAsConstraint tests whether an object is identical to | |
|
10131 | the object passed to its constructor | |
|
10132 | </summary> | |
|
10133 | </member> | |
|
10134 | <member name="M:NUnit.Framework.Constraints.SameAsConstraint.#ctor(System.Object)"> | |
|
10135 | <summary> | |
|
10136 | Initializes a new instance of the <see cref="T:SameAsConstraint"/> class. | |
|
10137 | </summary> | |
|
10138 | <param name="expected">The expected object.</param> | |
|
10139 | </member> | |
|
10140 | <member name="M:NUnit.Framework.Constraints.SameAsConstraint.Matches(System.Object)"> | |
|
10141 | <summary> | |
|
10142 | Test whether the constraint is satisfied by a given value | |
|
10143 | </summary> | |
|
10144 | <param name="actual">The value to be tested</param> | |
|
10145 | <returns>True for success, false for failure</returns> | |
|
10146 | </member> | |
|
10147 | <member name="M:NUnit.Framework.Constraints.SameAsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10148 | <summary> | |
|
10149 | Write the constraint description to a MessageWriter | |
|
10150 | </summary> | |
|
10151 | <param name="writer">The writer on which the description is displayed</param> | |
|
10152 | </member> | |
|
10153 | <member name="T:NUnit.Framework.Constraints.SamePathConstraint"> | |
|
10154 | <summary> | |
|
10155 | Summary description for SamePathConstraint. | |
|
10156 | </summary> | |
|
10157 | </member> | |
|
10158 | <member name="M:NUnit.Framework.Constraints.SamePathConstraint.#ctor(System.String)"> | |
|
10159 | <summary> | |
|
10160 | Initializes a new instance of the <see cref="T:SamePathConstraint"/> class. | |
|
10161 | </summary> | |
|
10162 | <param name="expected">The expected path</param> | |
|
10163 | </member> | |
|
10164 | <member name="M:NUnit.Framework.Constraints.SamePathConstraint.IsMatch(System.String,System.String)"> | |
|
10165 | <summary> | |
|
10166 | Test whether the constraint is satisfied by a given value | |
|
10167 | </summary> | |
|
10168 | <param name="expectedPath">The expected path</param> | |
|
10169 | <param name="actualPath">The actual path</param> | |
|
10170 | <returns>True for success, false for failure</returns> | |
|
10171 | </member> | |
|
10172 | <member name="M:NUnit.Framework.Constraints.SamePathConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10173 | <summary> | |
|
10174 | Write the constraint description to a MessageWriter | |
|
10175 | </summary> | |
|
10176 | <param name="writer">The writer on which the description is displayed</param> | |
|
10177 | </member> | |
|
10178 | <member name="T:NUnit.Framework.Constraints.SamePathOrUnderConstraint"> | |
|
10179 | <summary> | |
|
10180 | SamePathOrUnderConstraint tests that one path is under another | |
|
10181 | </summary> | |
|
10182 | </member> | |
|
10183 | <member name="M:NUnit.Framework.Constraints.SamePathOrUnderConstraint.#ctor(System.String)"> | |
|
10184 | <summary> | |
|
10185 | Initializes a new instance of the <see cref="T:SamePathOrUnderConstraint"/> class. | |
|
10186 | </summary> | |
|
10187 | <param name="expected">The expected path</param> | |
|
10188 | </member> | |
|
10189 | <member name="M:NUnit.Framework.Constraints.SamePathOrUnderConstraint.IsMatch(System.String,System.String)"> | |
|
10190 | <summary> | |
|
10191 | Test whether the constraint is satisfied by a given value | |
|
10192 | </summary> | |
|
10193 | <param name="expectedPath">The expected path</param> | |
|
10194 | <param name="actualPath">The actual path</param> | |
|
10195 | <returns>True for success, false for failure</returns> | |
|
10196 | </member> | |
|
10197 | <member name="M:NUnit.Framework.Constraints.SamePathOrUnderConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10198 | <summary> | |
|
10199 | Write the constraint description to a MessageWriter | |
|
10200 | </summary> | |
|
10201 | <param name="writer">The writer on which the description is displayed</param> | |
|
10202 | </member> | |
|
10203 | <member name="T:NUnit.Framework.Constraints.SomeItemsConstraint"> | |
|
10204 | <summary> | |
|
10205 | SomeItemsConstraint applies another constraint to each | |
|
10206 | item in a collection, succeeding if any of them succeeds. | |
|
10207 | </summary> | |
|
10208 | </member> | |
|
10209 | <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> | |
|
10210 | <summary> | |
|
10211 | Construct a SomeItemsConstraint on top of an existing constraint | |
|
10212 | </summary> | |
|
10213 | <param name="itemConstraint"></param> | |
|
10214 | </member> | |
|
10215 | <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.Matches(System.Object)"> | |
|
10216 | <summary> | |
|
10217 | Apply the item constraint to each item in the collection, | |
|
10218 | succeeding if any item succeeds. | |
|
10219 | </summary> | |
|
10220 | <param name="actual"></param> | |
|
10221 | <returns></returns> | |
|
10222 | </member> | |
|
10223 | <member name="M:NUnit.Framework.Constraints.SomeItemsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10224 | <summary> | |
|
10225 | Write a description of this constraint to a MessageWriter | |
|
10226 | </summary> | |
|
10227 | <param name="writer"></param> | |
|
10228 | </member> | |
|
10229 | <member name="T:NUnit.Framework.Constraints.StartsWithConstraint"> | |
|
10230 | <summary> | |
|
10231 | StartsWithConstraint can test whether a string starts | |
|
10232 | with an expected substring. | |
|
10233 | </summary> | |
|
10234 | </member> | |
|
10235 | <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.#ctor(System.String)"> | |
|
10236 | <summary> | |
|
10237 | Initializes a new instance of the <see cref="T:StartsWithConstraint"/> class. | |
|
10238 | </summary> | |
|
10239 | <param name="expected">The expected string</param> | |
|
10240 | </member> | |
|
10241 | <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.Matches(System.String)"> | |
|
10242 | <summary> | |
|
10243 | Test whether the constraint is matched by the actual value. | |
|
10244 | This is a template method, which calls the IsMatch method | |
|
10245 | of the derived class. | |
|
10246 | </summary> | |
|
10247 | <param name="actual"></param> | |
|
10248 | <returns></returns> | |
|
10249 | </member> | |
|
10250 | <member name="M:NUnit.Framework.Constraints.StartsWithConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10251 | <summary> | |
|
10252 | Write the constraint description to a MessageWriter | |
|
10253 | </summary> | |
|
10254 | <param name="writer">The writer on which the description is displayed</param> | |
|
10255 | </member> | |
|
10256 | <member name="T:NUnit.Framework.Constraints.SubPathConstraint"> | |
|
10257 | <summary> | |
|
10258 | SubPathConstraint tests that the actual path is under the expected path | |
|
10259 | </summary> | |
|
10260 | </member> | |
|
10261 | <member name="M:NUnit.Framework.Constraints.SubPathConstraint.#ctor(System.String)"> | |
|
10262 | <summary> | |
|
10263 | Initializes a new instance of the <see cref="T:SubPathConstraint"/> class. | |
|
10264 | </summary> | |
|
10265 | <param name="expected">The expected path</param> | |
|
10266 | </member> | |
|
10267 | <member name="M:NUnit.Framework.Constraints.SubPathConstraint.IsMatch(System.String,System.String)"> | |
|
10268 | <summary> | |
|
10269 | Test whether the constraint is satisfied by a given value | |
|
10270 | </summary> | |
|
10271 | <param name="expectedPath">The expected path</param> | |
|
10272 | <param name="actualPath">The actual path</param> | |
|
10273 | <returns>True for success, false for failure</returns> | |
|
10274 | </member> | |
|
10275 | <member name="M:NUnit.Framework.Constraints.SubPathConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10276 | <summary> | |
|
10277 | Write the constraint description to a MessageWriter | |
|
10278 | </summary> | |
|
10279 | <param name="writer">The writer on which the description is displayed</param> | |
|
10280 | </member> | |
|
10281 | <member name="T:NUnit.Framework.Constraints.SubstringConstraint"> | |
|
10282 | <summary> | |
|
10283 | SubstringConstraint can test whether a string contains | |
|
10284 | the expected substring. | |
|
10285 | </summary> | |
|
10286 | </member> | |
|
10287 | <member name="M:NUnit.Framework.Constraints.SubstringConstraint.#ctor(System.String)"> | |
|
10288 | <summary> | |
|
10289 | Initializes a new instance of the <see cref="T:SubstringConstraint"/> class. | |
|
10290 | </summary> | |
|
10291 | <param name="expected">The expected.</param> | |
|
10292 | </member> | |
|
10293 | <member name="M:NUnit.Framework.Constraints.SubstringConstraint.Matches(System.String)"> | |
|
10294 | <summary> | |
|
10295 | Test whether the constraint is satisfied by a given value | |
|
10296 | </summary> | |
|
10297 | <param name="actual">The value to be tested</param> | |
|
10298 | <returns>True for success, false for failure</returns> | |
|
10299 | </member> | |
|
10300 | <member name="M:NUnit.Framework.Constraints.SubstringConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10301 | <summary> | |
|
10302 | Write the constraint description to a MessageWriter | |
|
10303 | </summary> | |
|
10304 | <param name="writer">The writer on which the description is displayed</param> | |
|
10305 | </member> | |
|
10306 | <member name="T:NUnit.Framework.Constraints.ThrowsConstraint"> | |
|
10307 | <summary> | |
|
10308 | ThrowsConstraint is used to test the exception thrown by | |
|
10309 | a delegate by applying a constraint to it. | |
|
10310 | </summary> | |
|
10311 | </member> | |
|
10312 | <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.#ctor(NUnit.Framework.Constraints.Constraint)"> | |
|
10313 | <summary> | |
|
10314 | Initializes a new instance of the <see cref="T:NUnit.Framework.Constraints.ThrowsConstraint"/> class, | |
|
10315 | using a constraint to be applied to the exception. | |
|
10316 | </summary> | |
|
10317 | <param name="baseConstraint">A constraint to apply to the caught exception.</param> | |
|
10318 | </member> | |
|
10319 | <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.Matches(System.Object)"> | |
|
10320 | <summary> | |
|
10321 | Executes the code of the delegate and captures any exception. | |
|
10322 | If a non-null base constraint was provided, it applies that | |
|
10323 | constraint to the exception. | |
|
10324 | </summary> | |
|
10325 | <param name="actual">A delegate representing the code to be tested</param> | |
|
10326 | <returns>True if an exception is thrown and the constraint succeeds, otherwise false</returns> | |
|
10327 | </member> | |
|
10328 | <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.Matches``1(NUnit.Framework.Constraints.ActualValueDelegate{``0})"> | |
|
10329 | <summary> | |
|
10330 | Converts an ActualValueDelegate to a TestDelegate | |
|
10331 | before calling the primary overload. | |
|
10332 | </summary> | |
|
10333 | </member> | |
|
10334 | <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10335 | <summary> | |
|
10336 | Write the constraint description to a MessageWriter | |
|
10337 | </summary> | |
|
10338 | <param name="writer">The writer on which the description is displayed</param> | |
|
10339 | </member> | |
|
10340 | <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10341 | <summary> | |
|
10342 | Write the actual value for a failing constraint test to a | |
|
10343 | MessageWriter. The default implementation simply writes | |
|
10344 | the raw value of actual, leaving it to the writer to | |
|
10345 | perform any formatting. | |
|
10346 | </summary> | |
|
10347 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
10348 | </member> | |
|
10349 | <member name="M:NUnit.Framework.Constraints.ThrowsConstraint.GetStringRepresentation"> | |
|
10350 | <summary> | |
|
10351 | Returns the string representation of this constraint | |
|
10352 | </summary> | |
|
10353 | </member> | |
|
10354 | <member name="P:NUnit.Framework.Constraints.ThrowsConstraint.ActualException"> | |
|
10355 | <summary> | |
|
10356 | Get the actual exception thrown - used by Assert.Throws. | |
|
10357 | </summary> | |
|
10358 | </member> | |
|
10359 | <member name="T:NUnit.Framework.Constraints.ThrowsNothingConstraint"> | |
|
10360 | <summary> | |
|
10361 | ThrowsNothingConstraint tests that a delegate does not | |
|
10362 | throw an exception. | |
|
10363 | </summary> | |
|
10364 | </member> | |
|
10365 | <member name="M:NUnit.Framework.Constraints.ThrowsNothingConstraint.Matches(System.Object)"> | |
|
10366 | <summary> | |
|
10367 | Test whether the constraint is satisfied by a given value | |
|
10368 | </summary> | |
|
10369 | <param name="actual">The value to be tested</param> | |
|
10370 | <returns>True if no exception is thrown, otherwise false</returns> | |
|
10371 | </member> | |
|
10372 | <member name="M:NUnit.Framework.Constraints.ThrowsNothingConstraint.Matches``1(NUnit.Framework.Constraints.ActualValueDelegate{``0})"> | |
|
10373 | <summary> | |
|
10374 | Test whether the constraint is satisfied by a given delegate | |
|
10375 | </summary> | |
|
10376 | <param name="del">Delegate returning the value to be tested</param> | |
|
10377 | <returns>True if no exception is thrown, otherwise false</returns> | |
|
10378 | </member> | |
|
10379 | <member name="M:NUnit.Framework.Constraints.ThrowsNothingConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10380 | <summary> | |
|
10381 | Write the constraint description to a MessageWriter | |
|
10382 | </summary> | |
|
10383 | <param name="writer">The writer on which the description is displayed</param> | |
|
10384 | </member> | |
|
10385 | <member name="M:NUnit.Framework.Constraints.ThrowsNothingConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10386 | <summary> | |
|
10387 | Write the actual value for a failing constraint test to a | |
|
10388 | MessageWriter. Overridden in ThrowsNothingConstraint to write | |
|
10389 | information about the exception that was actually caught. | |
|
10390 | </summary> | |
|
10391 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
10392 | </member> | |
|
10393 | <member name="T:NUnit.Framework.Constraints.Tolerance"> | |
|
10394 | <summary> | |
|
10395 | The Tolerance class generalizes the notion of a tolerance | |
|
10396 | within which an equality test succeeds. Normally, it is | |
|
10397 | used with numeric types, but it can be used with any | |
|
10398 | type that supports taking a difference between two | |
|
10399 | objects and comparing that difference to a value. | |
|
10400 | </summary> | |
|
10401 | </member> | |
|
10402 | <member name="M:NUnit.Framework.Constraints.Tolerance.#ctor(System.Object)"> | |
|
10403 | <summary> | |
|
10404 | Constructs a linear tolerance of a specdified amount | |
|
10405 | </summary> | |
|
10406 | </member> | |
|
10407 | <member name="M:NUnit.Framework.Constraints.Tolerance.#ctor(System.Object,NUnit.Framework.Constraints.ToleranceMode)"> | |
|
10408 | <summary> | |
|
10409 | Constructs a tolerance given an amount and ToleranceMode | |
|
10410 | </summary> | |
|
10411 | </member> | |
|
10412 | <member name="M:NUnit.Framework.Constraints.Tolerance.CheckLinearAndNumeric"> | |
|
10413 | <summary> | |
|
10414 | Tests that the current Tolerance is linear with a | |
|
10415 | numeric value, throwing an exception if it is not. | |
|
10416 | </summary> | |
|
10417 | </member> | |
|
10418 | <member name="P:NUnit.Framework.Constraints.Tolerance.Empty"> | |
|
10419 | <summary> | |
|
10420 | Returns an empty Tolerance object, equivalent to | |
|
10421 | specifying no tolerance. In most cases, it results | |
|
10422 | in an exact match but for floats and doubles a | |
|
10423 | default tolerance may be used. | |
|
10424 | </summary> | |
|
10425 | </member> | |
|
10426 | <member name="P:NUnit.Framework.Constraints.Tolerance.Zero"> | |
|
10427 | <summary> | |
|
10428 | Returns a zero Tolerance object, equivalent to | |
|
10429 | specifying an exact match. | |
|
10430 | </summary> | |
|
10431 | </member> | |
|
10432 | <member name="P:NUnit.Framework.Constraints.Tolerance.Mode"> | |
|
10433 | <summary> | |
|
10434 | Gets the ToleranceMode for the current Tolerance | |
|
10435 | </summary> | |
|
10436 | </member> | |
|
10437 | <member name="P:NUnit.Framework.Constraints.Tolerance.Value"> | |
|
10438 | <summary> | |
|
10439 | Gets the value of the current Tolerance instance. | |
|
10440 | </summary> | |
|
10441 | </member> | |
|
10442 | <member name="P:NUnit.Framework.Constraints.Tolerance.Percent"> | |
|
10443 | <summary> | |
|
10444 | Returns a new tolerance, using the current amount as a percentage. | |
|
10445 | </summary> | |
|
10446 | </member> | |
|
10447 | <member name="P:NUnit.Framework.Constraints.Tolerance.Ulps"> | |
|
10448 | <summary> | |
|
10449 | Returns a new tolerance, using the current amount in Ulps. | |
|
10450 | </summary> | |
|
10451 | </member> | |
|
10452 | <member name="P:NUnit.Framework.Constraints.Tolerance.Days"> | |
|
10453 | <summary> | |
|
10454 | Returns a new tolerance with a TimeSpan as the amount, using | |
|
10455 | the current amount as a number of days. | |
|
10456 | </summary> | |
|
10457 | </member> | |
|
10458 | <member name="P:NUnit.Framework.Constraints.Tolerance.Hours"> | |
|
10459 | <summary> | |
|
10460 | Returns a new tolerance with a TimeSpan as the amount, using | |
|
10461 | the current amount as a number of hours. | |
|
10462 | </summary> | |
|
10463 | </member> | |
|
10464 | <member name="P:NUnit.Framework.Constraints.Tolerance.Minutes"> | |
|
10465 | <summary> | |
|
10466 | Returns a new tolerance with a TimeSpan as the amount, using | |
|
10467 | the current amount as a number of minutes. | |
|
10468 | </summary> | |
|
10469 | </member> | |
|
10470 | <member name="P:NUnit.Framework.Constraints.Tolerance.Seconds"> | |
|
10471 | <summary> | |
|
10472 | Returns a new tolerance with a TimeSpan as the amount, using | |
|
10473 | the current amount as a number of seconds. | |
|
10474 | </summary> | |
|
10475 | </member> | |
|
10476 | <member name="P:NUnit.Framework.Constraints.Tolerance.Milliseconds"> | |
|
10477 | <summary> | |
|
10478 | Returns a new tolerance with a TimeSpan as the amount, using | |
|
10479 | the current amount as a number of milliseconds. | |
|
10480 | </summary> | |
|
10481 | </member> | |
|
10482 | <member name="P:NUnit.Framework.Constraints.Tolerance.Ticks"> | |
|
10483 | <summary> | |
|
10484 | Returns a new tolerance with a TimeSpan as the amount, using | |
|
10485 | the current amount as a number of clock ticks. | |
|
10486 | </summary> | |
|
10487 | </member> | |
|
10488 | <member name="P:NUnit.Framework.Constraints.Tolerance.IsEmpty"> | |
|
10489 | <summary> | |
|
10490 | Returns true if the current tolerance is empty. | |
|
10491 | </summary> | |
|
10492 | </member> | |
|
10493 | <member name="T:NUnit.Framework.Constraints.ToleranceMode"> | |
|
10494 | <summary> | |
|
10495 | Modes in which the tolerance value for a comparison can be interpreted. | |
|
10496 | </summary> | |
|
10497 | </member> | |
|
10498 | <member name="F:NUnit.Framework.Constraints.ToleranceMode.None"> | |
|
10499 | <summary> | |
|
10500 | The tolerance was created with a value, without specifying | |
|
10501 | how the value would be used. This is used to prevent setting | |
|
10502 | the mode more than once and is generally changed to Linear | |
|
10503 | upon execution of the test. | |
|
10504 | </summary> | |
|
10505 | </member> | |
|
10506 | <member name="F:NUnit.Framework.Constraints.ToleranceMode.Linear"> | |
|
10507 | <summary> | |
|
10508 | The tolerance is used as a numeric range within which | |
|
10509 | two compared values are considered to be equal. | |
|
10510 | </summary> | |
|
10511 | </member> | |
|
10512 | <member name="F:NUnit.Framework.Constraints.ToleranceMode.Percent"> | |
|
10513 | <summary> | |
|
10514 | Interprets the tolerance as the percentage by which | |
|
10515 | the two compared values my deviate from each other. | |
|
10516 | </summary> | |
|
10517 | </member> | |
|
10518 | <member name="F:NUnit.Framework.Constraints.ToleranceMode.Ulps"> | |
|
10519 | <summary> | |
|
10520 | Compares two values based in their distance in | |
|
10521 | representable numbers. | |
|
10522 | </summary> | |
|
10523 | </member> | |
|
10524 | <member name="T:NUnit.Framework.Constraints.TrueConstraint"> | |
|
10525 | <summary> | |
|
10526 | TrueConstraint tests that the actual value is true | |
|
10527 | </summary> | |
|
10528 | </member> | |
|
10529 | <member name="M:NUnit.Framework.Constraints.TrueConstraint.#ctor"> | |
|
10530 | <summary> | |
|
10531 | Initializes a new instance of the <see cref="T:TrueConstraint"/> class. | |
|
10532 | </summary> | |
|
10533 | </member> | |
|
10534 | <member name="T:NUnit.Framework.Constraints.UniqueItemsConstraint"> | |
|
10535 | <summary> | |
|
10536 | UniqueItemsConstraint tests whether all the items in a | |
|
10537 | collection are unique. | |
|
10538 | </summary> | |
|
10539 | </member> | |
|
10540 | <member name="M:NUnit.Framework.Constraints.UniqueItemsConstraint.doMatch(System.Collections.IEnumerable)"> | |
|
10541 | <summary> | |
|
10542 | Check that all items are unique. | |
|
10543 | </summary> | |
|
10544 | <param name="actual"></param> | |
|
10545 | <returns></returns> | |
|
10546 | </member> | |
|
10547 | <member name="M:NUnit.Framework.Constraints.UniqueItemsConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10548 | <summary> | |
|
10549 | Write a description of this constraint to a MessageWriter | |
|
10550 | </summary> | |
|
10551 | <param name="writer"></param> | |
|
10552 | </member> | |
|
10553 | <member name="T:NUnit.Framework.Constraints.XmlSerializableConstraint"> | |
|
10554 | <summary> | |
|
10555 | XmlSerializableConstraint tests whether | |
|
10556 | an object is serializable in XML format. | |
|
10557 | </summary> | |
|
10558 | </member> | |
|
10559 | <member name="M:NUnit.Framework.Constraints.XmlSerializableConstraint.Matches(System.Object)"> | |
|
10560 | <summary> | |
|
10561 | Test whether the constraint is satisfied by a given value | |
|
10562 | </summary> | |
|
10563 | <param name="actual">The value to be tested</param> | |
|
10564 | <returns>True for success, false for failure</returns> | |
|
10565 | </member> | |
|
10566 | <member name="M:NUnit.Framework.Constraints.XmlSerializableConstraint.WriteDescriptionTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10567 | <summary> | |
|
10568 | Write the constraint description to a MessageWriter | |
|
10569 | </summary> | |
|
10570 | <param name="writer">The writer on which the description is displayed</param> | |
|
10571 | </member> | |
|
10572 | <member name="M:NUnit.Framework.Constraints.XmlSerializableConstraint.WriteActualValueTo(NUnit.Framework.Constraints.MessageWriter)"> | |
|
10573 | <summary> | |
|
10574 | Write the actual value for a failing constraint test to a | |
|
10575 | MessageWriter. The default implementation simply writes | |
|
10576 | the raw value of actual, leaving it to the writer to | |
|
10577 | perform any formatting. | |
|
10578 | </summary> | |
|
10579 | <param name="writer">The writer on which the actual value is displayed</param> | |
|
10580 | </member> | |
|
10581 | <member name="M:NUnit.Framework.Constraints.XmlSerializableConstraint.GetStringRepresentation"> | |
|
10582 | <summary> | |
|
10583 | Returns the string representation of this constraint | |
|
10584 | </summary> | |
|
10585 | </member> | |
|
10586 | <member name="T:NUnit.Framework.Constraints.AllOperator"> | |
|
10587 | <summary> | |
|
10588 | Represents a constraint that succeeds if all the | |
|
10589 | members of a collection match a base constraint. | |
|
10590 | </summary> | |
|
10591 | </member> | |
|
10592 | <member name="T:NUnit.Framework.Constraints.CollectionOperator"> | |
|
10593 | <summary> | |
|
10594 | Abstract base for operators that indicate how to | |
|
10595 | apply a constraint to items in a collection. | |
|
10596 | </summary> | |
|
10597 | </member> | |
|
10598 | <member name="T:NUnit.Framework.Constraints.PrefixOperator"> | |
|
10599 | <summary> | |
|
10600 | PrefixOperator takes a single constraint and modifies | |
|
10601 | it's action in some way. | |
|
10602 | </summary> | |
|
10603 | </member> | |
|
10604 | <member name="T:NUnit.Framework.Constraints.ConstraintOperator"> | |
|
10605 | <summary> | |
|
10606 | The ConstraintOperator class is used internally by a | |
|
10607 | ConstraintBuilder to represent an operator that | |
|
10608 | modifies or combines constraints. | |
|
10609 | ||
|
10610 | Constraint operators use left and right precedence | |
|
10611 | values to determine whether the top operator on the | |
|
10612 | stack should be reduced before pushing a new operator. | |
|
10613 | </summary> | |
|
10614 | </member> | |
|
10615 | <member name="F:NUnit.Framework.Constraints.ConstraintOperator.left_precedence"> | |
|
10616 | <summary> | |
|
10617 | The precedence value used when the operator | |
|
10618 | is about to be pushed to the stack. | |
|
10619 | </summary> | |
|
10620 | </member> | |
|
10621 | <member name="F:NUnit.Framework.Constraints.ConstraintOperator.right_precedence"> | |
|
10622 | <summary> | |
|
10623 | The precedence value used when the operator | |
|
10624 | is on the top of the stack. | |
|
10625 | </summary> | |
|
10626 | </member> | |
|
10627 | <member name="M:NUnit.Framework.Constraints.ConstraintOperator.Reduce(NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack)"> | |
|
10628 | <summary> | |
|
10629 | Reduce produces a constraint from the operator and | |
|
10630 | any arguments. It takes the arguments from the constraint | |
|
10631 | stack and pushes the resulting constraint on it. | |
|
10632 | </summary> | |
|
10633 | <param name="stack"></param> | |
|
10634 | </member> | |
|
10635 | <member name="P:NUnit.Framework.Constraints.ConstraintOperator.LeftContext"> | |
|
10636 | <summary> | |
|
10637 | The syntax element preceding this operator | |
|
10638 | </summary> | |
|
10639 | </member> | |
|
10640 | <member name="P:NUnit.Framework.Constraints.ConstraintOperator.RightContext"> | |
|
10641 | <summary> | |
|
10642 | The syntax element folowing this operator | |
|
10643 | </summary> | |
|
10644 | </member> | |
|
10645 | <member name="P:NUnit.Framework.Constraints.ConstraintOperator.LeftPrecedence"> | |
|
10646 | <summary> | |
|
10647 | The precedence value used when the operator | |
|
10648 | is about to be pushed to the stack. | |
|
10649 | </summary> | |
|
10650 | </member> | |
|
10651 | <member name="P:NUnit.Framework.Constraints.ConstraintOperator.RightPrecedence"> | |
|
10652 | <summary> | |
|
10653 | The precedence value used when the operator | |
|
10654 | is on the top of the stack. | |
|
10655 | </summary> | |
|
10656 | </member> | |
|
10657 | <member name="M:NUnit.Framework.Constraints.PrefixOperator.Reduce(NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack)"> | |
|
10658 | <summary> | |
|
10659 | Reduce produces a constraint from the operator and | |
|
10660 | any arguments. It takes the arguments from the constraint | |
|
10661 | stack and pushes the resulting constraint on it. | |
|
10662 | </summary> | |
|
10663 | <param name="stack"></param> | |
|
10664 | </member> | |
|
10665 | <member name="M:NUnit.Framework.Constraints.PrefixOperator.ApplyPrefix(NUnit.Framework.Constraints.Constraint)"> | |
|
10666 | <summary> | |
|
10667 | Returns the constraint created by applying this | |
|
10668 | prefix to another constraint. | |
|
10669 | </summary> | |
|
10670 | <param name="constraint"></param> | |
|
10671 | <returns></returns> | |
|
10672 | </member> | |
|
10673 | <member name="M:NUnit.Framework.Constraints.CollectionOperator.#ctor"> | |
|
10674 | <summary> | |
|
10675 | Constructs a CollectionOperator | |
|
10676 | </summary> | |
|
10677 | </member> | |
|
10678 | <member name="M:NUnit.Framework.Constraints.AllOperator.ApplyPrefix(NUnit.Framework.Constraints.Constraint)"> | |
|
10679 | <summary> | |
|
10680 | Returns a constraint that will apply the argument | |
|
10681 | to the members of a collection, succeeding if | |
|
10682 | they all succeed. | |
|
10683 | </summary> | |
|
10684 | </member> | |
|
10685 | <member name="T:NUnit.Framework.Constraints.AndOperator"> | |
|
10686 | <summary> | |
|
10687 | Operator that requires both it's arguments to succeed | |
|
10688 | </summary> | |
|
10689 | </member> | |
|
10690 | <member name="T:NUnit.Framework.Constraints.BinaryOperator"> | |
|
10691 | <summary> | |
|
10692 | Abstract base class for all binary operators | |
|
10693 | </summary> | |
|
10694 | </member> | |
|
10695 | <member name="M:NUnit.Framework.Constraints.BinaryOperator.Reduce(NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack)"> | |
|
10696 | <summary> | |
|
10697 | Reduce produces a constraint from the operator and | |
|
10698 | any arguments. It takes the arguments from the constraint | |
|
10699 | stack and pushes the resulting constraint on it. | |
|
10700 | </summary> | |
|
10701 | <param name="stack"></param> | |
|
10702 | </member> | |
|
10703 | <member name="M:NUnit.Framework.Constraints.BinaryOperator.ApplyOperator(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> | |
|
10704 | <summary> | |
|
10705 | Abstract method that produces a constraint by applying | |
|
10706 | the operator to its left and right constraint arguments. | |
|
10707 | </summary> | |
|
10708 | </member> | |
|
10709 | <member name="P:NUnit.Framework.Constraints.BinaryOperator.LeftPrecedence"> | |
|
10710 | <summary> | |
|
10711 | Gets the left precedence of the operator | |
|
10712 | </summary> | |
|
10713 | </member> | |
|
10714 | <member name="P:NUnit.Framework.Constraints.BinaryOperator.RightPrecedence"> | |
|
10715 | <summary> | |
|
10716 | Gets the right precedence of the operator | |
|
10717 | </summary> | |
|
10718 | </member> | |
|
10719 | <member name="M:NUnit.Framework.Constraints.AndOperator.#ctor"> | |
|
10720 | <summary> | |
|
10721 | Construct an AndOperator | |
|
10722 | </summary> | |
|
10723 | </member> | |
|
10724 | <member name="M:NUnit.Framework.Constraints.AndOperator.ApplyOperator(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> | |
|
10725 | <summary> | |
|
10726 | Apply the operator to produce an AndConstraint | |
|
10727 | </summary> | |
|
10728 | </member> | |
|
10729 | <member name="T:NUnit.Framework.Constraints.AttributeOperator"> | |
|
10730 | <summary> | |
|
10731 | Operator that tests for the presence of a particular attribute | |
|
10732 | on a type and optionally applies further tests to the attribute. | |
|
10733 | </summary> | |
|
10734 | </member> | |
|
10735 | <member name="T:NUnit.Framework.Constraints.SelfResolvingOperator"> | |
|
10736 | <summary> | |
|
10737 | Abstract base class for operators that are able to reduce to a | |
|
10738 | constraint whether or not another syntactic element follows. | |
|
10739 | </summary> | |
|
10740 | </member> | |
|
10741 | <member name="M:NUnit.Framework.Constraints.AttributeOperator.#ctor(System.Type)"> | |
|
10742 | <summary> | |
|
10743 | Construct an AttributeOperator for a particular Type | |
|
10744 | </summary> | |
|
10745 | <param name="type">The Type of attribute tested</param> | |
|
10746 | </member> | |
|
10747 | <member name="M:NUnit.Framework.Constraints.AttributeOperator.Reduce(NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack)"> | |
|
10748 | <summary> | |
|
10749 | Reduce produces a constraint from the operator and | |
|
10750 | any arguments. It takes the arguments from the constraint | |
|
10751 | stack and pushes the resulting constraint on it. | |
|
10752 | </summary> | |
|
10753 | </member> | |
|
10754 | <member name="T:NUnit.Framework.Constraints.ExactCountOperator"> | |
|
10755 | <summary> | |
|
10756 | Represents a constraint that succeeds if the specified | |
|
10757 | count of members of a collection match a base constraint. | |
|
10758 | </summary> | |
|
10759 | </member> | |
|
10760 | <member name="M:NUnit.Framework.Constraints.ExactCountOperator.#ctor(System.Int32)"> | |
|
10761 | <summary> | |
|
10762 | Construct an ExactCountOperator for a specified count | |
|
10763 | </summary> | |
|
10764 | <param name="expectedCount">The expected count</param> | |
|
10765 | </member> | |
|
10766 | <member name="M:NUnit.Framework.Constraints.ExactCountOperator.ApplyPrefix(NUnit.Framework.Constraints.Constraint)"> | |
|
10767 | <summary> | |
|
10768 | Returns a constraint that will apply the argument | |
|
10769 | to the members of a collection, succeeding if | |
|
10770 | none of them succeed. | |
|
10771 | </summary> | |
|
10772 | </member> | |
|
10773 | <member name="T:NUnit.Framework.Constraints.NoneOperator"> | |
|
10774 | <summary> | |
|
10775 | Represents a constraint that succeeds if none of the | |
|
10776 | members of a collection match a base constraint. | |
|
10777 | </summary> | |
|
10778 | </member> | |
|
10779 | <member name="M:NUnit.Framework.Constraints.NoneOperator.ApplyPrefix(NUnit.Framework.Constraints.Constraint)"> | |
|
10780 | <summary> | |
|
10781 | Returns a constraint that will apply the argument | |
|
10782 | to the members of a collection, succeeding if | |
|
10783 | none of them succeed. | |
|
10784 | </summary> | |
|
10785 | </member> | |
|
10786 | <member name="T:NUnit.Framework.Constraints.NotOperator"> | |
|
10787 | <summary> | |
|
10788 | Negates the test of the constraint it wraps. | |
|
10789 | </summary> | |
|
10790 | </member> | |
|
10791 | <member name="M:NUnit.Framework.Constraints.NotOperator.#ctor"> | |
|
10792 | <summary> | |
|
10793 | Constructs a new NotOperator | |
|
10794 | </summary> | |
|
10795 | </member> | |
|
10796 | <member name="M:NUnit.Framework.Constraints.NotOperator.ApplyPrefix(NUnit.Framework.Constraints.Constraint)"> | |
|
10797 | <summary> | |
|
10798 | Returns a NotConstraint applied to its argument. | |
|
10799 | </summary> | |
|
10800 | </member> | |
|
10801 | <member name="T:NUnit.Framework.Constraints.OrOperator"> | |
|
10802 | <summary> | |
|
10803 | Operator that requires at least one of it's arguments to succeed | |
|
10804 | </summary> | |
|
10805 | </member> | |
|
10806 | <member name="M:NUnit.Framework.Constraints.OrOperator.#ctor"> | |
|
10807 | <summary> | |
|
10808 | Construct an OrOperator | |
|
10809 | </summary> | |
|
10810 | </member> | |
|
10811 | <member name="M:NUnit.Framework.Constraints.OrOperator.ApplyOperator(NUnit.Framework.Constraints.Constraint,NUnit.Framework.Constraints.Constraint)"> | |
|
10812 | <summary> | |
|
10813 | Apply the operator to produce an OrConstraint | |
|
10814 | </summary> | |
|
10815 | </member> | |
|
10816 | <member name="T:NUnit.Framework.Constraints.PropOperator"> | |
|
10817 | <summary> | |
|
10818 | Operator used to test for the presence of a named Property | |
|
10819 | on an object and optionally apply further tests to the | |
|
10820 | value of that property. | |
|
10821 | </summary> | |
|
10822 | </member> | |
|
10823 | <member name="M:NUnit.Framework.Constraints.PropOperator.#ctor(System.String)"> | |
|
10824 | <summary> | |
|
10825 | Constructs a PropOperator for a particular named property | |
|
10826 | </summary> | |
|
10827 | </member> | |
|
10828 | <member name="M:NUnit.Framework.Constraints.PropOperator.Reduce(NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack)"> | |
|
10829 | <summary> | |
|
10830 | Reduce produces a constraint from the operator and | |
|
10831 | any arguments. It takes the arguments from the constraint | |
|
10832 | stack and pushes the resulting constraint on it. | |
|
10833 | </summary> | |
|
10834 | <param name="stack"></param> | |
|
10835 | </member> | |
|
10836 | <member name="P:NUnit.Framework.Constraints.PropOperator.Name"> | |
|
10837 | <summary> | |
|
10838 | Gets the name of the property to which the operator applies | |
|
10839 | </summary> | |
|
10840 | </member> | |
|
10841 | <member name="T:NUnit.Framework.Constraints.SomeOperator"> | |
|
10842 | <summary> | |
|
10843 | Represents a constraint that succeeds if any of the | |
|
10844 | members of a collection match a base constraint. | |
|
10845 | </summary> | |
|
10846 | </member> | |
|
10847 | <member name="M:NUnit.Framework.Constraints.SomeOperator.ApplyPrefix(NUnit.Framework.Constraints.Constraint)"> | |
|
10848 | <summary> | |
|
10849 | Returns a constraint that will apply the argument | |
|
10850 | to the members of a collection, succeeding if | |
|
10851 | any of them succeed. | |
|
10852 | </summary> | |
|
10853 | </member> | |
|
10854 | <member name="T:NUnit.Framework.Constraints.ThrowsOperator"> | |
|
10855 | <summary> | |
|
10856 | Operator that tests that an exception is thrown and | |
|
10857 | optionally applies further tests to the exception. | |
|
10858 | </summary> | |
|
10859 | </member> | |
|
10860 | <member name="M:NUnit.Framework.Constraints.ThrowsOperator.#ctor"> | |
|
10861 | <summary> | |
|
10862 | Construct a ThrowsOperator | |
|
10863 | </summary> | |
|
10864 | </member> | |
|
10865 | <member name="M:NUnit.Framework.Constraints.ThrowsOperator.Reduce(NUnit.Framework.Constraints.ConstraintBuilder.ConstraintStack)"> | |
|
10866 | <summary> | |
|
10867 | Reduce produces a constraint from the operator and | |
|
10868 | any arguments. It takes the arguments from the constraint | |
|
10869 | stack and pushes the resulting constraint on it. | |
|
10870 | </summary> | |
|
10871 | </member> | |
|
10872 | <member name="T:NUnit.Framework.Constraints.WithOperator"> | |
|
10873 | <summary> | |
|
10874 | Represents a constraint that simply wraps the | |
|
10875 | constraint provided as an argument, without any | |
|
10876 | further functionality, but which modifes the | |
|
10877 | order of evaluation because of its precedence. | |
|
10878 | </summary> | |
|
10879 | </member> | |
|
10880 | <member name="M:NUnit.Framework.Constraints.WithOperator.#ctor"> | |
|
10881 | <summary> | |
|
10882 | Constructor for the WithOperator | |
|
10883 | </summary> | |
|
10884 | </member> | |
|
10885 | <member name="M:NUnit.Framework.Constraints.WithOperator.ApplyPrefix(NUnit.Framework.Constraints.Constraint)"> | |
|
10886 | <summary> | |
|
10887 | Returns a constraint that wraps its argument | |
|
10888 | </summary> | |
|
10889 | </member> | |
|
10890 | <member name="T:NUnit.Framework.AssertionException"> | |
|
10891 | <summary> | |
|
10892 | Thrown when an assertion failed. | |
|
10893 | </summary> | |
|
10894 | </member> | |
|
10895 | <member name="M:NUnit.Framework.AssertionException.#ctor(System.String)"> | |
|
10896 | <param name="message">The error message that explains | |
|
10897 | the reason for the exception</param> | |
|
10898 | </member> | |
|
10899 | <member name="M:NUnit.Framework.AssertionException.#ctor(System.String,System.Exception)"> | |
|
10900 | <param name="message">The error message that explains | |
|
10901 | the reason for the exception</param> | |
|
10902 | <param name="inner">The exception that caused the | |
|
10903 | current exception</param> | |
|
10904 | </member> | |
|
10905 | <member name="M:NUnit.Framework.AssertionException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> | |
|
10906 | <summary> | |
|
10907 | Serialization Constructor | |
|
10908 | </summary> | |
|
10909 | </member> | |
|
10910 | <member name="T:NUnit.Framework.IgnoreException"> | |
|
10911 | <summary> | |
|
10912 | Thrown when an assertion failed. | |
|
10913 | </summary> | |
|
10914 | </member> | |
|
10915 | <member name="M:NUnit.Framework.IgnoreException.#ctor(System.String)"> | |
|
10916 | <param name="message"></param> | |
|
10917 | </member> | |
|
10918 | <member name="M:NUnit.Framework.IgnoreException.#ctor(System.String,System.Exception)"> | |
|
10919 | <param name="message">The error message that explains | |
|
10920 | the reason for the exception</param> | |
|
10921 | <param name="inner">The exception that caused the | |
|
10922 | current exception</param> | |
|
10923 | </member> | |
|
10924 | <member name="M:NUnit.Framework.IgnoreException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> | |
|
10925 | <summary> | |
|
10926 | Serialization Constructor | |
|
10927 | </summary> | |
|
10928 | </member> | |
|
10929 | <member name="T:NUnit.Framework.InconclusiveException"> | |
|
10930 | <summary> | |
|
10931 | Thrown when a test executes inconclusively. | |
|
10932 | </summary> | |
|
10933 | </member> | |
|
10934 | <member name="M:NUnit.Framework.InconclusiveException.#ctor(System.String)"> | |
|
10935 | <param name="message">The error message that explains | |
|
10936 | the reason for the exception</param> | |
|
10937 | </member> | |
|
10938 | <member name="M:NUnit.Framework.InconclusiveException.#ctor(System.String,System.Exception)"> | |
|
10939 | <param name="message">The error message that explains | |
|
10940 | the reason for the exception</param> | |
|
10941 | <param name="inner">The exception that caused the | |
|
10942 | current exception</param> | |
|
10943 | </member> | |
|
10944 | <member name="M:NUnit.Framework.InconclusiveException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> | |
|
10945 | <summary> | |
|
10946 | Serialization Constructor | |
|
10947 | </summary> | |
|
10948 | </member> | |
|
10949 | <member name="T:NUnit.Framework.SuccessException"> | |
|
10950 | <summary> | |
|
10951 | Thrown when an assertion failed. | |
|
10952 | </summary> | |
|
10953 | </member> | |
|
10954 | <member name="M:NUnit.Framework.SuccessException.#ctor(System.String)"> | |
|
10955 | <param name="message"></param> | |
|
10956 | </member> | |
|
10957 | <member name="M:NUnit.Framework.SuccessException.#ctor(System.String,System.Exception)"> | |
|
10958 | <param name="message">The error message that explains | |
|
10959 | the reason for the exception</param> | |
|
10960 | <param name="inner">The exception that caused the | |
|
10961 | current exception</param> | |
|
10962 | </member> | |
|
10963 | <member name="M:NUnit.Framework.SuccessException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)"> | |
|
10964 | <summary> | |
|
10965 | Serialization Constructor | |
|
10966 | </summary> | |
|
10967 | </member> | |
|
10968 | <member name="T:NUnit.Framework.INUnitEqualityComparer`1"> | |
|
10969 | <summary> | |
|
10970 | ||
|
10971 | </summary> | |
|
10972 | <typeparam name="T"></typeparam> | |
|
10973 | </member> | |
|
10974 | <member name="M:NUnit.Framework.INUnitEqualityComparer`1.AreEqual(`0,`0,NUnit.Framework.Constraints.Tolerance@)"> | |
|
10975 | <summary> | |
|
10976 | Compares two objects of a given Type for equality within a tolerance | |
|
10977 | </summary> | |
|
10978 | <param name="x">The first object to compare</param> | |
|
10979 | <param name="y">The second object to compare</param> | |
|
10980 | <param name="tolerance">The tolerance to use in the comparison</param> | |
|
10981 | <returns></returns> | |
|
10982 | </member> | |
|
10983 | </members> | |
|
10984 | </doc> |
@@ -0,0 +1,15 | |||
|
1 | Copyright © 2002-2014 Charlie Poole | |
|
2 | Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov | |
|
3 | Copyright © 2000-2002 Philip A. Craig | |
|
4 | ||
|
5 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. | |
|
6 | ||
|
7 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: | |
|
8 | ||
|
9 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. | |
|
10 | ||
|
11 | Portions Copyright © 2002-2014 Charlie Poole or Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig | |
|
12 | ||
|
13 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. | |
|
14 | ||
|
15 | 3. This notice may not be removed or altered from any source distribution. |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
|
1 | NO CONTENT: new file 100644, binary diff hidden |
@@ -15,3 +15,6 Implab.Diagnostics.Interactive/bin/ | |||
|
15 | 15 | Implab.Diagnostics.Interactive/obj/ |
|
16 | 16 | MonoPlay/bin/ |
|
17 | 17 | MonoPlay/obj/ |
|
18 | Implab.Test/Implab.Format.Test/bin/ | |
|
19 | Implab.Test/Implab.Format.Test/obj/ | |
|
20 | *.suo |
@@ -10,6 +10,7 | |||
|
10 | 10 | <RootNamespace>Implab.Format.Test</RootNamespace> |
|
11 | 11 | <AssemblyName>Implab.Format.Test</AssemblyName> |
|
12 | 12 | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
13 | <ReleaseVersion>0.2</ReleaseVersion> | |
|
13 | 14 | </PropertyGroup> |
|
14 | 15 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
15 | 16 | <DebugSymbols>true</DebugSymbols> |
@@ -32,7 +33,7 | |||
|
32 | 33 | <ItemGroup> |
|
33 | 34 | <Reference Include="System" /> |
|
34 | 35 | <Reference Include="nunit.framework"> |
|
35 |
<HintPath>..\..\packages\NUnit. |
|
|
36 | <HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath> | |
|
36 | 37 | </Reference> |
|
37 | 38 | </ItemGroup> |
|
38 | 39 | <ItemGroup> |
@@ -40,6 +41,12 | |||
|
40 | 41 | </ItemGroup> |
|
41 | 42 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
42 | 43 | <ItemGroup> |
|
44 | <ProjectReference Include="..\..\Implab\Implab.csproj"> | |
|
45 | <Project>{F550F1F8-8746-4AD0-9614-855F4C4B7F05}</Project> | |
|
46 | <Name>Implab</Name> | |
|
47 | </ProjectReference> | |
|
48 | </ItemGroup> | |
|
49 | <ItemGroup> | |
|
43 | 50 | <None Include="packages.config" /> |
|
44 | 51 | </ItemGroup> |
|
45 | 52 | </Project> No newline at end of file |
@@ -1,11 +1,87 | |||
|
1 | 1 | using NUnit.Framework; |
|
2 | 2 | using System; |
|
3 | using Implab.Formats.JSON; | |
|
4 | using Implab.Automaton; | |
|
3 | 5 | |
|
4 | 6 | namespace Implab.Format.Test { |
|
5 |
[TestFixture |
|
|
7 | [TestFixture] | |
|
6 | 8 | public class JsonTests { |
|
7 |
[Test |
|
|
8 |
public void Test |
|
|
9 | [Test] | |
|
10 | public void TestScannerValidTokens() { | |
|
11 | using (var scanner = new JSONScanner(@"9123, -123, 0, 0.1, -0.2, -0.1e3, 1.3E-3, ""some \t\n\u0020 text"", literal []{}:")) { | |
|
12 | ||
|
13 | Tuple<JsonTokenType,object>[] expexted = { | |
|
14 | new Tuple<JsonTokenType,object>(JsonTokenType.Number, 9123d), | |
|
15 | new Tuple<JsonTokenType,object>(JsonTokenType.ValueSeparator, ", "), | |
|
16 | new Tuple<JsonTokenType,object>(JsonTokenType.Number, -123d), | |
|
17 | new Tuple<JsonTokenType,object>(JsonTokenType.ValueSeparator, ", "), | |
|
18 | new Tuple<JsonTokenType,object>(JsonTokenType.Number, 0d), | |
|
19 | new Tuple<JsonTokenType,object>(JsonTokenType.ValueSeparator, ", "), | |
|
20 | new Tuple<JsonTokenType,object>(JsonTokenType.Number, 0.1d), | |
|
21 | new Tuple<JsonTokenType,object>(JsonTokenType.ValueSeparator, ", "), | |
|
22 | new Tuple<JsonTokenType,object>(JsonTokenType.Number, -0.2d), | |
|
23 | new Tuple<JsonTokenType,object>(JsonTokenType.ValueSeparator, ", "), | |
|
24 | new Tuple<JsonTokenType,object>(JsonTokenType.Number, -0.1e3d), | |
|
25 | new Tuple<JsonTokenType,object>(JsonTokenType.ValueSeparator, ", "), | |
|
26 | new Tuple<JsonTokenType,object>(JsonTokenType.Number, 1.3E-3d), | |
|
27 | new Tuple<JsonTokenType,object>(JsonTokenType.ValueSeparator, ", "), | |
|
28 | new Tuple<JsonTokenType,object>(JsonTokenType.String, "some \t\n text"), | |
|
29 | new Tuple<JsonTokenType,object>(JsonTokenType.ValueSeparator, ", "), | |
|
30 | new Tuple<JsonTokenType,object>(JsonTokenType.Literal, "literal"), | |
|
31 | new Tuple<JsonTokenType,object>(JsonTokenType.BeginArray, " ["), | |
|
32 | new Tuple<JsonTokenType,object>(JsonTokenType.EndArray, "]"), | |
|
33 | new Tuple<JsonTokenType,object>(JsonTokenType.BeginObject, "{"), | |
|
34 | new Tuple<JsonTokenType,object>(JsonTokenType.EndObject, "}"), | |
|
35 | new Tuple<JsonTokenType,object>(JsonTokenType.NameSeparator, ":") | |
|
36 | }; | |
|
37 | ||
|
38 | object value; | |
|
39 | JsonTokenType tokenType; | |
|
40 | for (var i = 0; i < expexted.Length; i++) { | |
|
41 | ||
|
42 | Assert.IsTrue(scanner.ReadToken(out value, out tokenType)); | |
|
43 | Assert.AreEqual(expexted[i].Item1, tokenType); | |
|
44 | Assert.AreEqual(expexted[i].Item2, value); | |
|
45 | } | |
|
46 | ||
|
47 | Assert.IsFalse(scanner.ReadToken(out value, out tokenType)); | |
|
48 | } | |
|
49 | } | |
|
50 | ||
|
51 | [Test] | |
|
52 | public void TestScannerBadTokens() { | |
|
53 | var bad = new [] { | |
|
54 | " 1", | |
|
55 | " literal", | |
|
56 | " \"", | |
|
57 | "\"unclosed string", | |
|
58 | "1.bad", | |
|
59 | "001", // should be read as three numbers | |
|
60 | "--10", | |
|
61 | "+10", | |
|
62 | "1.0.0", | |
|
63 | "1e1.0", | |
|
64 | "l1teral0", | |
|
65 | ".123", | |
|
66 | "-.123" | |
|
67 | }; | |
|
68 | ||
|
69 | foreach (var json in bad) | |
|
70 | using (var scanner = new JSONScanner(json)) { | |
|
71 | try { | |
|
72 | object value; | |
|
73 | JsonTokenType token; | |
|
74 | scanner.ReadToken(out value, out token); | |
|
75 | if (!Object.Equals(value,json)) { | |
|
76 | Console.WriteLine("'{0}' is read as {1}", json, value is String ? String.Format("'{0}'", value) : value ); | |
|
77 | continue; | |
|
78 | } | |
|
79 | Assert.Fail("Token '{0}' shouldn't pass", json); | |
|
80 | } catch (ParserException e) { | |
|
81 | Console.WriteLine(e.Message); | |
|
82 | } | |
|
83 | } | |
|
84 | ||
|
9 | 85 | } |
|
10 | 86 | } |
|
11 | 87 | } |
@@ -1,4 +1,4 | |||
|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 | <packages> |
|
3 |
<package id="NUnit" version=" |
|
|
3 | <package id="NUnit" version="2.6.4" targetFramework="net45" /> | |
|
4 | 4 | </packages> No newline at end of file |
@@ -62,8 +62,10 | |||
|
62 | 62 | </ItemGroup> |
|
63 | 63 | <ItemGroup> |
|
64 | 64 | <Compile Include="AsyncTests.cs" /> |
|
65 | <Compile Include="CancelationTests.cs" /> | |
|
65 | 66 | <Compile Include="PromiseHelper.cs" /> |
|
66 | 67 | <Compile Include="Properties\AssemblyInfo.cs" /> |
|
68 | <Compile Include="RunnableComponentTests.cs" /> | |
|
67 | 69 | </ItemGroup> |
|
68 | 70 | <ItemGroup> |
|
69 | 71 | <ProjectReference Include="..\Implab\Implab.csproj"> |
@@ -58,6 +58,7 | |||
|
58 | 58 | <Compile Include="PromiseHelper.cs" /> |
|
59 | 59 | <Compile Include="Properties\AssemblyInfo.cs" /> |
|
60 | 60 | <Compile Include="CancelationTests.cs" /> |
|
61 | <Compile Include="RunnableComponentTests.cs" /> | |
|
61 | 62 | </ItemGroup> |
|
62 | 63 | <ItemGroup> |
|
63 | 64 | <ProjectReference Include="..\Implab\Implab.csproj"> |
@@ -78,13 +78,9 namespace Implab { | |||
|
78 | 78 | /// <exception cref="InvalidOperationException">Данное обещание уже выполнено</exception> |
|
79 | 79 | protected void SetError(Exception error) { |
|
80 | 80 | if (BeginTransit()) { |
|
81 | if (error is OperationCanceledException) { | |
|
82 | m_error = error.InnerException; | |
|
83 | CompleteTransit(CANCELLED_STATE); | |
|
84 | } else { | |
|
85 | m_error = error is PromiseTransientException ? error.InnerException : error; | |
|
81 | m_error = error; | |
|
86 | 82 |
|
|
87 | } | |
|
83 | ||
|
88 | 84 | Signal(); |
|
89 | 85 | } else { |
|
90 | 86 | WaitTransition(); |
@@ -139,11 +135,11 namespace Implab { | |||
|
139 | 135 | case SUCCEEDED_STATE: |
|
140 | 136 | return; |
|
141 | 137 | case CANCELLED_STATE: |
|
142 | throw new OperationCanceledException(); | |
|
138 | throw new OperationCanceledException("The operation has been cancelled", m_error); | |
|
143 | 139 | case REJECTED_STATE: |
|
144 | 140 | throw new TargetInvocationException(m_error); |
|
145 | 141 | default: |
|
146 |
throw new ApplicationException(String.Format(" |
|
|
142 | throw new ApplicationException(String.Format("The promise state {0} is invalid", m_state)); | |
|
147 | 143 | } |
|
148 | 144 | } |
|
149 | 145 | #endregion |
@@ -134,7 +134,7 namespace Implab { | |||
|
134 | 134 | } |
|
135 | 135 | |
|
136 | 136 | protected void SetResult() { |
|
137 |
BeginSetResult() |
|
|
137 | if(BeginSetResult()) | |
|
138 | 138 | EndSetResult(); |
|
139 | 139 | } |
|
140 | 140 | } |
@@ -4,6 +4,15 namespace Implab { | |||
|
4 | 4 | public class ActionChainTask : ActionChainTaskBase, IDeferred { |
|
5 | 5 | readonly Func<IPromise> m_task; |
|
6 | 6 | |
|
7 | /// <summary> | |
|
8 | /// Initializes a new instance of the <see cref="Implab.ActionChainTask"/> class. | |
|
9 | /// </summary> | |
|
10 | /// <param name="task">The operation which will be performed when the <see cref="Resolve()"/> is called.</param> | |
|
11 | /// <param name="error">The error handler which will invoke when the <see cref="Reject(Exception)"/> is called or when the task fails with an error.</param> | |
|
12 | /// <param name="cancel">The cancellation handler.</param> | |
|
13 | /// <param name="autoCancellable">If set to <c>true</c> will automatically accept | |
|
14 | /// all cancel requests before the task is started with <see cref="Resolve()"/>, | |
|
15 | /// after that all requests are directed to the task.</param> | |
|
7 | 16 | public ActionChainTask(Func<IPromise> task, Func<Exception, IPromise> error, Func<Exception, IPromise> cancel, bool autoCancellable) : base(error,cancel, autoCancellable) { |
|
8 | 17 | m_task = task; |
|
9 | 18 | } |
@@ -12,8 +21,10 namespace Implab { | |||
|
12 | 21 | if (m_task != null && LockCancelation()) { |
|
13 | 22 | try { |
|
14 | 23 | var p = m_task(); |
|
15 |
p.On(SetResult, HandleErrorInternal, |
|
|
24 | p.On(SetResult, HandleErrorInternal, HandleCancelInternal); | |
|
16 | 25 | CancellationRequested(p.Cancel); |
|
26 | } catch (OperationCanceledException reason){ | |
|
27 | HandleCancelInternal(reason); | |
|
17 | 28 | } catch(Exception err) { |
|
18 | 29 | HandleErrorInternal(err); |
|
19 | 30 | } |
@@ -2,12 +2,10 | |||
|
2 | 2 | using System.Threading; |
|
3 | 3 | |
|
4 | 4 | namespace Implab { |
|
5 |
public class ActionChainTaskBase : Abstract |
|
|
5 | public class ActionChainTaskBase : AbstractTask { | |
|
6 | 6 | readonly Func<Exception, IPromise> m_error; |
|
7 | 7 | readonly Func<Exception, IPromise> m_cancel; |
|
8 | 8 | |
|
9 | int m_cancelationLock; | |
|
10 | ||
|
11 | 9 | protected ActionChainTaskBase(Func<Exception, IPromise> error, Func<Exception, IPromise> cancel, bool autoCancellable) { |
|
12 | 10 | m_error = error; |
|
13 | 11 | m_cancel = cancel; |
@@ -20,19 +18,28 namespace Implab { | |||
|
20 | 18 | HandleErrorInternal(error); |
|
21 | 19 | } |
|
22 | 20 | |
|
23 | ||
|
21 | public override void CancelOperation(Exception reason) { | |
|
22 | if (LockCancelation()) | |
|
23 | // отмена вызвана до начала выполнения задачи | |
|
24 | HandleCancelInternal(reason); | |
|
25 | } | |
|
24 | 26 | |
|
25 |
p |
|
|
26 | if (LockCancelation()) { | |
|
27 | protected void HandleCancelInternal(Exception reason) { | |
|
27 | 28 |
|
|
28 | 29 |
|
|
29 | m_cancel(reason).On(SetResult, SetError, SetCancelled); | |
|
30 | // вызываем обработчик отмены | |
|
31 | var p = m_cancel(reason); | |
|
32 | p.On(SetResult, HandleErrorInternal, SetCancelledInternal); | |
|
33 | // сообщаем асинхронной операции, что клиент уже не хочет получать результат | |
|
34 | // т.е. если он инициировал отмену, задача отменилась, вызвался обрабочик отмены | |
|
35 | // отбработчику сообщили, что результат уже не нужен и уже сам обработчик решает | |
|
36 | // отдавать ли результат или подтвердить отмену (или вернуть ошибку). | |
|
37 | CancellationRequested(p.Cancel); | |
|
30 | 38 |
|
|
31 | 39 |
|
|
32 | 40 |
|
|
33 | 41 |
|
|
34 | SetCancelled(reason); | |
|
35 | } | |
|
42 | HandleErrorInternal(reason ?? new OperationCanceledException()); | |
|
36 | 43 | } |
|
37 | 44 | } |
|
38 | 45 | |
@@ -40,19 +47,16 namespace Implab { | |||
|
40 | 47 | if (m_error != null) { |
|
41 | 48 | try { |
|
42 | 49 | var p = m_error(error); |
|
43 | p.On(SetResult,SetError,SetCancelled); | |
|
50 | p.On(SetResult, SetErrorInternal, SetCancelledInternal); | |
|
44 | 51 | CancellationRequested(p.Cancel); |
|
45 | 52 | } catch (Exception err) { |
|
46 | SetError(err); | |
|
53 | SetErrorInternal(error); | |
|
47 | 54 | } |
|
48 | 55 | } else { |
|
49 | SetError(error); | |
|
56 | SetErrorInternal(error); | |
|
50 | 57 | } |
|
51 | 58 | } |
|
52 | 59 | |
|
53 | protected bool LockCancelation() { | |
|
54 | return 0 == Interlocked.CompareExchange(ref m_cancelationLock, 1, 0); | |
|
55 | } | |
|
56 | 60 | } |
|
57 | 61 | } |
|
58 | 62 |
@@ -12,8 +12,10 namespace Implab { | |||
|
12 | 12 | if (m_task != null && LockCancelation()) { |
|
13 | 13 | try { |
|
14 | 14 | var p = m_task(value); |
|
15 |
p.On(SetResult, HandleErrorInternal, |
|
|
15 | p.On(SetResult, HandleErrorInternal, HandleCancelInternal); | |
|
16 | 16 | CancellationRequested(p.Cancel); |
|
17 | } catch (OperationCanceledException reason) { | |
|
18 | HandleCancelInternal(reason); | |
|
17 | 19 | } catch(Exception err) { |
|
18 | 20 | HandleErrorInternal(err); |
|
19 | 21 | } |
@@ -12,6 +12,8 namespace Implab { | |||
|
12 | 12 | try { |
|
13 | 13 | m_task(); |
|
14 | 14 | SetResult(); |
|
15 | } catch(OperationCanceledException reason) { | |
|
16 | HandleCancelInternal(reason); | |
|
15 | 17 | } catch(Exception err) { |
|
16 | 18 | HandleErrorInternal(err); |
|
17 | 19 | } |
@@ -1,13 +1,10 | |||
|
1 | 1 | using System; |
|
2 | using System.Threading; | |
|
3 | 2 | |
|
4 | 3 | namespace Implab { |
|
5 |
public class ActionTaskBase : Abstract |
|
|
4 | public class ActionTaskBase : AbstractTask { | |
|
6 | 5 | readonly Action<Exception> m_cancel; |
|
7 | 6 | readonly Action<Exception> m_error; |
|
8 | 7 | |
|
9 | int m_cancelationLock; | |
|
10 | ||
|
11 | 8 | protected ActionTaskBase( Action<Exception> error, Action<Exception> cancel, bool autoCancellable) { |
|
12 | 9 | m_error = error; |
|
13 | 10 | m_cancel = cancel; |
@@ -21,37 +18,36 namespace Implab { | |||
|
21 | 18 | HandleErrorInternal(error); |
|
22 | 19 | } |
|
23 | 20 | |
|
21 | public override void CancelOperation(Exception reason) { | |
|
22 | if (LockCancelation()) | |
|
23 | HandleCancelInternal(reason); | |
|
24 | } | |
|
25 | ||
|
24 | 26 | protected void HandleErrorInternal(Exception error) { |
|
25 | 27 | if (m_error != null) { |
|
26 | 28 | try { |
|
27 | 29 | m_error(error); |
|
28 | 30 | SetResult(); |
|
29 | 31 | } catch(Exception err) { |
|
30 | SetError(err); | |
|
32 | SetErrorInternal(err); | |
|
31 | 33 | } |
|
32 | 34 | } else { |
|
33 | SetError(error); | |
|
35 | SetErrorInternal(error); | |
|
34 | 36 | } |
|
35 | 37 | } |
|
36 | 38 | |
|
37 |
p |
|
|
38 | if (LockCancelation()) { | |
|
39 | protected void HandleCancelInternal(Exception error) { | |
|
39 | 40 |
|
|
40 | 41 |
|
|
41 |
|
|
|
42 | m_cancel(error); | |
|
42 | 43 |
|
|
43 | 44 |
|
|
44 | 45 |
|
|
45 | 46 |
|
|
46 | 47 |
|
|
47 | SetCancelled(reason); | |
|
48 | HandleErrorInternal(error ?? new OperationCanceledException()); | |
|
49 | } | |
|
48 | 50 |
|
|
49 | 51 | } |
|
50 | 52 | } |
|
51 | 53 | |
|
52 | protected bool LockCancelation() { | |
|
53 | return 0 == Interlocked.CompareExchange(ref m_cancelationLock, 1, 0); | |
|
54 | } | |
|
55 | } | |
|
56 | } | |
|
57 |
@@ -12,6 +12,8 namespace Implab { | |||
|
12 | 12 | try { |
|
13 | 13 | m_task(value); |
|
14 | 14 | SetResult(); |
|
15 | } catch(OperationCanceledException reason) { | |
|
16 | HandleCancelInternal(reason); | |
|
15 | 17 | } catch(Exception err) { |
|
16 | 18 | HandleErrorInternal(err); |
|
17 | 19 | } |
@@ -1,14 +1,24 | |||
|
1 | 1 | namespace Implab.Components { |
|
2 | 2 | |
|
3 | 3 | public enum ExecutionState { |
|
4 |
|
|
|
5 | Uninitialized, | |
|
4 | Undefined = 0, | |
|
5 | ||
|
6 | Created, | |
|
7 | ||
|
8 | Initializing, | |
|
9 | ||
|
6 | 10 | Ready, |
|
11 | ||
|
7 | 12 | Starting, |
|
13 | ||
|
8 | 14 | Running, |
|
15 | ||
|
9 | 16 | Stopping, |
|
10 | Stopped, | |
|
17 | ||
|
18 | Failed, | |
|
19 | ||
|
11 | 20 | Disposed, |
|
12 | Failed | |
|
21 | ||
|
22 | Last = Disposed | |
|
13 | 23 | } |
|
14 | 24 | } No newline at end of file |
@@ -11,7 +11,7 namespace Implab.Components { | |||
|
11 | 11 | /// Completes initialization. |
|
12 | 12 | /// </summary> |
|
13 | 13 | /// <remarks> |
|
14 | /// Normally virtual shouldn't be called from the constructor, due to the incomplete object state, but | |
|
14 | /// Normally virtual methods shouldn't be called from the constructor, due to the incomplete object state, but | |
|
15 | 15 | /// they can be called from this method. This method is also usefull when we constructing a complex grpah |
|
16 | 16 | /// of components where cyclic references may take place. |
|
17 | 17 | /// </remarks> |
@@ -1,24 +1,164 | |||
|
1 | 1 | using System; |
|
2 | using Implab.Parsing; | |
|
3 | 2 | |
|
4 | 3 | namespace Implab.Components { |
|
5 | public class RunnableComponent : Disposable, IRunnable, IInitializable { | |
|
4 | public abstract class RunnableComponent : IDisposable, IRunnable, IInitializable { | |
|
5 | enum Commands { | |
|
6 | Ok = 0, | |
|
7 | Fail, | |
|
8 | Init, | |
|
9 | Start, | |
|
10 | Stop, | |
|
11 | Dispose, | |
|
12 | Last = Dispose | |
|
13 | } | |
|
14 | ||
|
15 | class StateMachine { | |
|
16 | static readonly ExecutionState[,] _transitions; | |
|
6 | 17 | |
|
18 | static StateMachine() { | |
|
19 | _transitions = new ExecutionState[(int)ExecutionState.Last + 1, (int)Commands.Last + 1]; | |
|
20 | ||
|
21 | Edge(ExecutionState.Created, ExecutionState.Initializing, Commands.Init); | |
|
22 | Edge(ExecutionState.Created, ExecutionState.Disposed, Commands.Dispose); | |
|
23 | ||
|
24 | Edge(ExecutionState.Initializing, ExecutionState.Ready, Commands.Ok); | |
|
25 | Edge(ExecutionState.Initializing, ExecutionState.Failed, Commands.Fail); | |
|
26 | ||
|
27 | Edge(ExecutionState.Ready, ExecutionState.Starting, Commands.Start); | |
|
28 | Edge(ExecutionState.Ready, ExecutionState.Disposed, Commands.Dispose); | |
|
29 | ||
|
30 | Edge(ExecutionState.Starting, ExecutionState.Running, Commands.Ok); | |
|
31 | Edge(ExecutionState.Starting, ExecutionState.Failed, Commands.Fail); | |
|
32 | Edge(ExecutionState.Starting, ExecutionState.Stopping, Commands.Stop); | |
|
33 | Edge(ExecutionState.Starting, ExecutionState.Disposed, Commands.Dispose); | |
|
7 | 34 | |
|
35 | Edge(ExecutionState.Running, ExecutionState.Failed, Commands.Fail); | |
|
36 | Edge(ExecutionState.Running, ExecutionState.Stopping, Commands.Stop); | |
|
37 | Edge(ExecutionState.Running, ExecutionState.Disposed, Commands.Dispose); | |
|
8 | 38 | |
|
39 | Edge(ExecutionState.Stopping, ExecutionState.Failed, Commands.Fail); | |
|
40 | Edge(ExecutionState.Stopping, ExecutionState.Disposed, Commands.Ok); | |
|
9 | 41 | |
|
42 | Edge(ExecutionState.Failed, ExecutionState.Disposed, Commands.Dispose); | |
|
43 | } | |
|
44 | ||
|
45 | static void Edge(ExecutionState s1, ExecutionState s2, Commands cmd) { | |
|
46 | _transitions[(int)s1, (int)cmd] = s2; | |
|
47 | } | |
|
48 | ||
|
49 | public ExecutionState State { | |
|
50 | get; | |
|
51 | private set; | |
|
52 | } | |
|
53 | ||
|
54 | public StateMachine(ExecutionState initial) { | |
|
55 | State = initial; | |
|
56 | } | |
|
57 | ||
|
58 | public bool Move(Commands cmd) { | |
|
59 | var next = _transitions[(int)State, (int)cmd]; | |
|
60 | if (next == ExecutionState.Undefined) | |
|
61 | return false; | |
|
62 | State = next; | |
|
63 | return true; | |
|
64 | } | |
|
65 | } | |
|
10 | 66 | |
|
11 | 67 | IPromise m_pending; |
|
12 | 68 | Exception m_lastError; |
|
13 | 69 | |
|
70 | readonly StateMachine m_stateMachine; | |
|
71 | ||
|
14 | 72 | protected RunnableComponent(bool initialized) { |
|
73 | m_stateMachine = new StateMachine(initialized ? ExecutionState.Ready : ExecutionState.Created); | |
|
74 | } | |
|
75 | ||
|
76 | protected virtual int DisposeTimeout { | |
|
77 | get { | |
|
78 | return 10000; | |
|
79 | } | |
|
80 | } | |
|
81 | ||
|
82 | void ThrowInvalidCommand(Commands cmd) { | |
|
83 | if (m_stateMachine.State == ExecutionState.Disposed) | |
|
84 | throw new ObjectDisposedException(ToString()); | |
|
85 | ||
|
86 | throw new InvalidOperationException(String.Format("Commnd {0} is not allowed in the state {1}", cmd, m_stateMachine.State)); | |
|
87 | } | |
|
88 | ||
|
89 | void Move(Commands cmd) { | |
|
90 | if (!m_stateMachine.Move(cmd)) | |
|
91 | ThrowInvalidCommand(cmd); | |
|
92 | } | |
|
93 | ||
|
94 | void Invoke(Commands cmd, Action action) { | |
|
95 | lock (m_stateMachine) | |
|
96 | Move(cmd); | |
|
97 | ||
|
98 | try { | |
|
99 | action(); | |
|
100 | lock(m_stateMachine) | |
|
101 | Move(Commands.Ok); | |
|
102 | ||
|
103 | } catch (Exception err) { | |
|
104 | lock (m_stateMachine) { | |
|
105 | Move(Commands.Fail); | |
|
106 | m_lastError = err; | |
|
107 | } | |
|
108 | throw; | |
|
109 | } | |
|
110 | } | |
|
15 | 111 | |
|
112 | IPromise InvokeAsync(Commands cmd, Func<IPromise> action, Action<IPromise, IDeferred> chain) { | |
|
113 | IPromise promise = null; | |
|
114 | IPromise prev; | |
|
115 | ||
|
116 | var task = new ActionChainTask(action, null, null, true); | |
|
117 | ||
|
118 | lock (m_stateMachine) { | |
|
119 | Move(cmd); | |
|
120 | ||
|
121 | prev = m_pending; | |
|
122 | ||
|
123 | promise = task.Then( | |
|
124 | () => { | |
|
125 | lock(m_stateMachine) { | |
|
126 | if (m_pending == promise) { | |
|
127 | Move(Commands.Ok); | |
|
128 | m_pending = null; | |
|
16 | 129 | } |
|
130 | } | |
|
131 | }, e => { | |
|
132 | lock(m_stateMachine) { | |
|
133 | if (m_pending == promise) { | |
|
134 | Move(Commands.Fail); | |
|
135 | m_pending = null; | |
|
136 | m_lastError = e; | |
|
137 | } | |
|
138 | } | |
|
139 | throw new PromiseTransientException(e); | |
|
140 | } | |
|
141 | ); | |
|
142 | ||
|
143 | m_pending = promise; | |
|
144 | } | |
|
145 | ||
|
146 | if (prev == null) | |
|
147 | task.Resolve(); | |
|
148 | else | |
|
149 | chain(prev, task); | |
|
150 | ||
|
151 | return promise; | |
|
152 | } | |
|
153 | ||
|
17 | 154 | |
|
18 | 155 | #region IInitializable implementation |
|
19 | 156 | |
|
20 | 157 | public void Init() { |
|
158 | Invoke(Commands.Init, OnInitialize); | |
|
159 | } | |
|
21 | 160 | |
|
161 | protected virtual void OnInitialize() { | |
|
22 | 162 | } |
|
23 | 163 | |
|
24 | 164 | #endregion |
@@ -26,33 +166,92 namespace Implab.Components { | |||
|
26 | 166 | #region IRunnable implementation |
|
27 | 167 | |
|
28 | 168 | public IPromise Start() { |
|
29 | throw new NotImplementedException(); | |
|
169 | return InvokeAsync(Commands.Start, OnStart, null); | |
|
30 | 170 | } |
|
31 | 171 | |
|
32 | 172 | protected virtual IPromise OnStart() { |
|
33 | 173 | return Promise.SUCCESS; |
|
34 | 174 | } |
|
35 | 175 | |
|
36 | protected virtual void Run() { | |
|
176 | public IPromise Stop() { | |
|
177 | return InvokeAsync(Commands.Stop, OnStop, StopPending).Then(Dispose); | |
|
178 | } | |
|
179 | ||
|
180 | protected virtual IPromise OnStop() { | |
|
181 | return Promise.SUCCESS; | |
|
37 | 182 | } |
|
38 | 183 | |
|
39 | public IPromise Stop() { | |
|
40 | throw new NotImplementedException(); | |
|
184 | /// <summary> | |
|
185 | /// Stops the current operation if one exists. | |
|
186 | /// </summary> | |
|
187 | /// <param name="current">Current.</param> | |
|
188 | /// <param name="stop">Stop.</param> | |
|
189 | protected virtual void StopPending(IPromise current, IDeferred stop) { | |
|
190 | if (current == null) { | |
|
191 | stop.Resolve(); | |
|
192 | } else { | |
|
193 | // связваем текущую операцию с операцией остановки | |
|
194 | current.On( | |
|
195 | stop.Resolve, // если текущая операция заверщилась, то можно начинать остановку | |
|
196 | stop.Reject, // если текущая операция дала ошибку - то все плохо, нельзя продолжать | |
|
197 | e => stop.Resolve() // если текущая отменилась, то можно начинать остановку | |
|
198 | ); | |
|
199 | // посылаем текущей операции сигнал остановки | |
|
200 | current.Cancel(); | |
|
201 | } | |
|
41 | 202 | } |
|
42 | 203 | |
|
43 | 204 | public ExecutionState State { |
|
44 | 205 | get { |
|
45 | throw new NotImplementedException(); | |
|
206 | return m_stateMachine.State; | |
|
46 | 207 | } |
|
47 | 208 | } |
|
48 | 209 | |
|
49 | 210 | public Exception LastError { |
|
50 | 211 | get { |
|
51 | throw new NotImplementedException(); | |
|
212 | return m_lastError; | |
|
52 | 213 | } |
|
53 | 214 | } |
|
54 | 215 | |
|
55 | 216 | #endregion |
|
217 | ||
|
218 | #region IDisposable implementation | |
|
219 | ||
|
220 | public void Dispose() { | |
|
221 | IPromise pending; | |
|
222 | lock (m_stateMachine) { | |
|
223 | if (m_stateMachine.State == ExecutionState.Disposed) | |
|
224 | return; | |
|
225 | ||
|
226 | Move(Commands.Dispose); | |
|
227 | ||
|
228 | GC.SuppressFinalize(this); | |
|
229 | ||
|
230 | pending = m_pending; | |
|
231 | m_pending = null; | |
|
232 | } | |
|
233 | if (pending != null) { | |
|
234 | pending.Cancel(); | |
|
235 | pending.Timeout(DisposeTimeout).On( | |
|
236 | () => Dispose(true, null), | |
|
237 | err => Dispose(true, err), | |
|
238 | reason => Dispose(true, new OperationCanceledException("The operation is cancelled", reason)) | |
|
239 | ); | |
|
240 | } else { | |
|
241 | Dispose(true, m_lastError); | |
|
56 | 242 | } |
|
57 | 243 | } |
|
58 | 244 | |
|
245 | ~RunnableComponent() { | |
|
246 | Dispose(false, null); | |
|
247 | } | |
|
248 | ||
|
249 | #endregion | |
|
250 | ||
|
251 | protected virtual void Dispose(bool disposing, Exception lastError) { | |
|
252 | ||
|
253 | } | |
|
254 | ||
|
255 | } | |
|
256 | } | |
|
257 |
@@ -13,8 +13,10 namespace Implab { | |||
|
13 | 13 | if (m_task != null && LockCancelation()) { |
|
14 | 14 | try { |
|
15 | 15 | var operation = m_task(); |
|
16 |
operation.On(SetResult, HandleErrorInternal, |
|
|
16 | operation.On(SetResult, HandleErrorInternal, HandleCancelInternal); | |
|
17 | 17 | CancellationRequested(operation.Cancel); |
|
18 | } catch (OperationCanceledException reason) { | |
|
19 | HandleCancelInternal(reason); | |
|
18 | 20 | } catch (Exception err) { |
|
19 | 21 | HandleErrorInternal(err); |
|
20 | 22 | } |
@@ -1,13 +1,10 | |||
|
1 | 1 | using System; |
|
2 | using System.Threading; | |
|
3 | 2 | |
|
4 | 3 | namespace Implab { |
|
5 |
public class FuncChainTaskBase<TResult> : Abstract |
|
|
4 | public class FuncChainTaskBase<TResult> : AbstractTask<TResult> { | |
|
6 | 5 | readonly Func<Exception, IPromise<TResult>> m_error; |
|
7 | 6 | readonly Func<Exception, IPromise<TResult>> m_cancel; |
|
8 | 7 | |
|
9 | int m_cancelationLock; | |
|
10 | ||
|
11 | 8 | protected FuncChainTaskBase( Func<Exception, IPromise<TResult>> error, Func<Exception, IPromise<TResult>> cancel, bool autoCancellable) { |
|
12 | 9 | m_error = error; |
|
13 | 10 | m_cancel = cancel; |
@@ -21,37 +18,36 namespace Implab { | |||
|
21 | 18 | } |
|
22 | 19 | |
|
23 | 20 | public override void CancelOperation(Exception reason) { |
|
24 |
if (LockCancelation()) |
|
|
25 | if (m_cancel != null) { | |
|
26 | try { | |
|
27 | m_cancel(reason).On(SetResult, HandleErrorInternal, SetCancelled); | |
|
28 | } catch (Exception err) { | |
|
29 | HandleErrorInternal(err); | |
|
30 | } | |
|
31 | } else { | |
|
32 | SetCancelled(reason); | |
|
33 | } | |
|
34 | } | |
|
35 | ||
|
21 | if (LockCancelation()) | |
|
22 | HandleCancelInternal(reason); | |
|
36 | 23 | } |
|
37 | 24 | |
|
38 | 25 | protected void HandleErrorInternal(Exception error) { |
|
39 | 26 | if (m_error != null) { |
|
40 | 27 | try { |
|
41 |
var |
|
|
42 | ||
|
43 | operation.On(SetResult, SetError, SetCancelled); | |
|
44 | CancellationRequested(operation.Cancel); | |
|
28 | var p = m_error(error); | |
|
29 | p.On(SetResult, SetErrorInternal, SetCancelledInternal); | |
|
30 | CancellationRequested(p.Cancel); | |
|
45 | 31 | } catch(Exception err) { |
|
46 | SetError(err); | |
|
32 | SetErrorInternal(err); | |
|
47 | 33 | } |
|
48 | 34 | } else { |
|
49 | SetError(error); | |
|
35 | SetErrorInternal(error); | |
|
50 | 36 | } |
|
51 | 37 | } |
|
52 | 38 | |
|
53 |
protected |
|
|
54 | return 0 == Interlocked.CompareExchange(ref m_cancelationLock, 1, 0); | |
|
39 | protected void HandleCancelInternal(Exception reason) { | |
|
40 | if (m_cancel != null) { | |
|
41 | try { | |
|
42 | var p = m_cancel(reason); | |
|
43 | p.On(SetResult, HandleErrorInternal, SetCancelledInternal); | |
|
44 | CancellationRequested(p.Cancel); | |
|
45 | } catch (Exception err) { | |
|
46 | HandleErrorInternal(err); | |
|
47 | } | |
|
48 | } else { | |
|
49 | HandleErrorInternal(reason ?? new OperationCanceledException()); | |
|
50 | } | |
|
55 | 51 | } |
|
56 | 52 | } |
|
57 | 53 | } |
@@ -14,6 +14,8 namespace Implab { | |||
|
14 | 14 | var operation = m_task(value); |
|
15 | 15 | operation.On(SetResult, HandleErrorInternal, SetCancelled); |
|
16 | 16 | CancellationRequested(operation.Cancel); |
|
17 | } catch (OperationCanceledException reason) { | |
|
18 | HandleCancelInternal(reason); | |
|
17 | 19 | } catch (Exception err) { |
|
18 | 20 | HandleErrorInternal(err); |
|
19 | 21 | } |
@@ -13,6 +13,8 namespace Implab { | |||
|
13 | 13 | if (m_task != null && LockCancelation()) { |
|
14 | 14 | try { |
|
15 | 15 | SetResult(m_task()); |
|
16 | } catch(OperationCanceledException reason) { | |
|
17 | HandleCancelInternal(reason); | |
|
16 | 18 | } catch(Exception err) { |
|
17 | 19 | HandleErrorInternal(err); |
|
18 | 20 | } |
@@ -1,13 +1,10 | |||
|
1 | 1 | using System; |
|
2 | using System.Threading; | |
|
3 | 2 | |
|
4 | 3 | namespace Implab { |
|
5 |
public class FuncTaskBase<TResult> : Abstract |
|
|
4 | public class FuncTaskBase<TResult> : AbstractTask<TResult> { | |
|
6 | 5 | readonly Func<Exception, TResult> m_cancel; |
|
7 | 6 | readonly Func<Exception, TResult> m_error; |
|
8 | 7 | |
|
9 | int m_cancelationLock; | |
|
10 | ||
|
11 | 8 | protected FuncTaskBase( Func<Exception, TResult> error, Func<Exception, TResult> cancel, bool autoCancellable) { |
|
12 | 9 | m_error = error; |
|
13 | 10 | m_cancel = cancel; |
@@ -26,15 +23,19 namespace Implab { | |||
|
26 | 23 | try { |
|
27 | 24 | SetResult(m_error(error)); |
|
28 | 25 | } catch(Exception err) { |
|
29 | SetError(err); | |
|
26 | SetErrorInternal(err); | |
|
30 | 27 | } |
|
31 | 28 | } else { |
|
32 | SetError(error); | |
|
29 | SetErrorInternal(error); | |
|
33 | 30 | } |
|
34 | 31 | } |
|
35 | 32 | |
|
36 | 33 | public override void CancelOperation(Exception reason) { |
|
37 |
if (LockCancelation()) |
|
|
34 | if (LockCancelation()) | |
|
35 | HandleCancelInternal(reason); | |
|
36 | } | |
|
37 | ||
|
38 | protected void HandleCancelInternal(Exception reason) { | |
|
38 | 39 |
|
|
39 | 40 |
|
|
40 | 41 |
|
@@ -42,14 +43,10 namespace Implab { | |||
|
42 | 43 |
|
|
43 | 44 |
|
|
44 | 45 |
|
|
45 | SetCancelled(reason); | |
|
46 | } | |
|
46 | HandleErrorInternal(reason ?? new OperationCanceledException()); | |
|
47 | 47 | } |
|
48 | 48 | } |
|
49 | 49 | |
|
50 | protected bool LockCancelation() { | |
|
51 | return 0 == Interlocked.CompareExchange(ref m_cancelationLock, 1, 0); | |
|
52 | } | |
|
53 | 50 | } |
|
54 | 51 | } |
|
55 | 52 |
@@ -12,6 +12,8 namespace Implab { | |||
|
12 | 12 | if (m_task != null && LockCancelation()) { |
|
13 | 13 | try { |
|
14 | 14 | SetResult(m_task(value)); |
|
15 | } catch(OperationCanceledException reason) { | |
|
16 | HandleCancelInternal(reason); | |
|
15 | 17 |
} catch |
|
16 | 18 | HandleErrorInternal(err); |
|
17 | 19 | } |
@@ -8,6 +8,9 | |||
|
8 | 8 | <RootNamespace>Implab</RootNamespace> |
|
9 | 9 | <AssemblyName>Implab</AssemblyName> |
|
10 | 10 | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|
11 | <ReleaseVersion>0.2</ReleaseVersion> | |
|
12 | <ProductVersion>8.0.30703</ProductVersion> | |
|
13 | <SchemaVersion>2.0</SchemaVersion> | |
|
11 | 14 | </PropertyGroup> |
|
12 | 15 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
13 | 16 | <DebugSymbols>true</DebugSymbols> |
@@ -88,40 +91,10 | |||
|
88 | 91 | <Compile Include="IPromise.cs" /> |
|
89 | 92 | <Compile Include="IServiceLocator.cs" /> |
|
90 | 93 | <Compile Include="ITaskController.cs" /> |
|
91 | <Compile Include="JSON\JSONElementContext.cs" /> | |
|
92 | <Compile Include="JSON\JSONElementType.cs" /> | |
|
93 | <Compile Include="JSON\JSONGrammar.cs" /> | |
|
94 | <Compile Include="JSON\JSONParser.cs" /> | |
|
95 | <Compile Include="JSON\JSONScanner.cs" /> | |
|
96 | <Compile Include="JSON\JsonTokenType.cs" /> | |
|
97 | <Compile Include="JSON\JSONWriter.cs" /> | |
|
98 | <Compile Include="JSON\JSONXmlReader.cs" /> | |
|
99 | <Compile Include="JSON\JSONXmlReaderOptions.cs" /> | |
|
100 | <Compile Include="JSON\StringTranslator.cs" /> | |
|
101 | 94 | <Compile Include="Parallels\DispatchPool.cs" /> |
|
102 | 95 | <Compile Include="Parallels\ArrayTraits.cs" /> |
|
103 | 96 | <Compile Include="Parallels\MTQueue.cs" /> |
|
104 | 97 | <Compile Include="Parallels\WorkerPool.cs" /> |
|
105 | <Compile Include="Parsing\AltToken.cs" /> | |
|
106 | <Compile Include="Parsing\BinaryToken.cs" /> | |
|
107 | <Compile Include="Parsing\CatToken.cs" /> | |
|
108 | <Compile Include="Parsing\CDFADefinition.cs" /> | |
|
109 | <Compile Include="Parsing\DFABuilder.cs" /> | |
|
110 | <Compile Include="Parsing\DFAStateDescriptor.cs" /> | |
|
111 | <Compile Include="Parsing\DFAutomaton.cs" /> | |
|
112 | <Compile Include="Parsing\EDFADefinition.cs" /> | |
|
113 | <Compile Include="Parsing\EmptyToken.cs" /> | |
|
114 | <Compile Include="Parsing\EndToken.cs" /> | |
|
115 | <Compile Include="Parsing\EnumAlphabet.cs" /> | |
|
116 | <Compile Include="Parsing\Grammar.cs" /> | |
|
117 | <Compile Include="Parsing\IAlphabet.cs" /> | |
|
118 | <Compile Include="Parsing\IDFADefinition.cs" /> | |
|
119 | <Compile Include="Parsing\IVisitor.cs" /> | |
|
120 | <Compile Include="Parsing\ParserException.cs" /> | |
|
121 | <Compile Include="Parsing\Scanner.cs" /> | |
|
122 | <Compile Include="Parsing\StarToken.cs" /> | |
|
123 | <Compile Include="Parsing\SymbolToken.cs" /> | |
|
124 | <Compile Include="Parsing\Token.cs" /> | |
|
125 | 98 | <Compile Include="ProgressInitEventArgs.cs" /> |
|
126 | 99 | <Compile Include="Properties\AssemblyInfo.cs" /> |
|
127 | 100 | <Compile Include="Parallels\AsyncPool.cs" /> |
@@ -178,11 +151,50 | |||
|
178 | 151 | <Compile Include="Components\ExecutionState.cs" /> |
|
179 | 152 | <Compile Include="Components\RunnableComponent.cs" /> |
|
180 | 153 | <Compile Include="Components\IFactory.cs" /> |
|
181 |
<Compile Include=" |
|
|
182 |
<Compile Include=" |
|
|
183 |
<Compile Include=" |
|
|
184 |
<Compile Include=" |
|
|
185 |
<Compile Include=" |
|
|
154 | <Compile Include="Automaton\IAlphabet.cs" /> | |
|
155 | <Compile Include="Automaton\ParserException.cs" /> | |
|
156 | <Compile Include="Automaton\IndexedAlphabetBase.cs" /> | |
|
157 | <Compile Include="Automaton\IAlphabetBuilder.cs" /> | |
|
158 | <Compile Include="Automaton\RegularExpressions\AltToken.cs" /> | |
|
159 | <Compile Include="Automaton\RegularExpressions\BinaryToken.cs" /> | |
|
160 | <Compile Include="Automaton\RegularExpressions\CatToken.cs" /> | |
|
161 | <Compile Include="Automaton\RegularExpressions\StarToken.cs" /> | |
|
162 | <Compile Include="Automaton\RegularExpressions\SymbolToken.cs" /> | |
|
163 | <Compile Include="Automaton\RegularExpressions\EmptyToken.cs" /> | |
|
164 | <Compile Include="Automaton\RegularExpressions\Token.cs" /> | |
|
165 | <Compile Include="Automaton\RegularExpressions\IVisitor.cs" /> | |
|
166 | <Compile Include="Automaton\AutomatonTransition.cs" /> | |
|
167 | <Compile Include="Formats\JSON\JSONElementContext.cs" /> | |
|
168 | <Compile Include="Formats\JSON\JSONElementType.cs" /> | |
|
169 | <Compile Include="Formats\JSON\JSONGrammar.cs" /> | |
|
170 | <Compile Include="Formats\JSON\JSONParser.cs" /> | |
|
171 | <Compile Include="Formats\JSON\JSONScanner.cs" /> | |
|
172 | <Compile Include="Formats\JSON\JsonTokenType.cs" /> | |
|
173 | <Compile Include="Formats\JSON\JSONWriter.cs" /> | |
|
174 | <Compile Include="Formats\JSON\JSONXmlReader.cs" /> | |
|
175 | <Compile Include="Formats\JSON\JSONXmlReaderOptions.cs" /> | |
|
176 | <Compile Include="Formats\JSON\StringTranslator.cs" /> | |
|
177 | <Compile Include="Automaton\MapAlphabet.cs" /> | |
|
178 | <Compile Include="Formats\CharAlphabet.cs" /> | |
|
179 | <Compile Include="Formats\ByteAlphabet.cs" /> | |
|
180 | <Compile Include="Automaton\IDFATable.cs" /> | |
|
181 | <Compile Include="Automaton\IDFATableBuilder.cs" /> | |
|
182 | <Compile Include="Automaton\DFATable.cs" /> | |
|
183 | <Compile Include="Automaton\RegularExpressions\RegularExpressionVisitor.cs" /> | |
|
184 | <Compile Include="Automaton\RegularExpressions\ITaggedDFABuilder.cs" /> | |
|
185 | <Compile Include="Formats\TextScanner.cs" /> | |
|
186 | <Compile Include="Formats\StringScanner.cs" /> | |
|
187 | <Compile Include="Formats\ReaderScanner.cs" /> | |
|
188 | <Compile Include="Formats\ScannerContext.cs" /> | |
|
189 | <Compile Include="Formats\Grammar.cs" /> | |
|
190 | <Compile Include="Automaton\RegularExpressions\EndTokenT.cs" /> | |
|
191 | <Compile Include="Automaton\RegularExpressions\EndToken.cs" /> | |
|
192 | <Compile Include="Automaton\RegularExpressions\RegularExpressionVisitorT.cs" /> | |
|
193 | <Compile Include="Automaton\AutomatonConst.cs" /> | |
|
194 | <Compile Include="Automaton\RegularExpressions\RegularDFA.cs" /> | |
|
195 | <Compile Include="Components\LazyAndWeak.cs" /> | |
|
196 | <Compile Include="AbstractTask.cs" /> | |
|
197 | <Compile Include="AbstractTaskT.cs" /> | |
|
186 | 198 | </ItemGroup> |
|
187 | 199 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
188 | 200 | <ItemGroup /> |
@@ -257,5 +269,8 | |||
|
257 | 269 | </ProjectExtensions> |
|
258 | 270 | <ItemGroup> |
|
259 | 271 | <Folder Include="Components\" /> |
|
272 | <Folder Include="Automaton\RegularExpressions\" /> | |
|
273 | <Folder Include="Formats\" /> | |
|
274 | <Folder Include="Formats\JSON\" /> | |
|
260 | 275 | </ItemGroup> |
|
261 | 276 | </Project> No newline at end of file |
@@ -3,11 +3,6 using System; | |||
|
3 | 3 | using Implab.Diagnostics; |
|
4 | 4 | using System.Collections.Generic; |
|
5 | 5 | |
|
6 | ||
|
7 | #if NET_4_5 | |
|
8 | using System.Threading.Tasks; | |
|
9 | #endif | |
|
10 | ||
|
11 | 6 | namespace Implab { |
|
12 | 7 | public static class PromiseExtensions { |
|
13 | 8 | public static IPromise<T> DispatchToCurrentContext<T>(this IPromise<T> that) { |
@@ -17,12 +12,12 namespace Implab { | |||
|
17 | 12 | return that; |
|
18 | 13 | |
|
19 | 14 | var p = new SyncContextPromise<T>(context); |
|
20 | p.On(that.Cancel, PromiseEventType.Cancelled); | |
|
15 | p.CancellationRequested(that.Cancel); | |
|
21 | 16 | |
|
22 | 17 | that.On( |
|
23 | 18 | p.Resolve, |
|
24 | 19 | p.Reject, |
|
25 | p.Cancel | |
|
20 | p.CancelOperation | |
|
26 | 21 | ); |
|
27 | 22 | return p; |
|
28 | 23 | } |
@@ -32,13 +27,12 namespace Implab { | |||
|
32 | 27 | Safe.ArgumentNotNull(context, "context"); |
|
33 | 28 | |
|
34 | 29 | var p = new SyncContextPromise<T>(context); |
|
35 | p.On(that.Cancel, PromiseEventType.Cancelled); | |
|
36 | ||
|
30 | p.CancellationRequested(that.Cancel); | |
|
37 | 31 | |
|
38 | 32 | that.On( |
|
39 | 33 | p.Resolve, |
|
40 | 34 | p.Reject, |
|
41 | p.Cancel | |
|
35 | p.CancelOperation | |
|
42 | 36 | ); |
|
43 | 37 | return p; |
|
44 | 38 | } |
@@ -77,8 +71,8 namespace Implab { | |||
|
77 | 71 | }; |
|
78 | 72 | } |
|
79 | 73 | |
|
80 | static void CancelCallback(object cookie) { | |
|
81 | ((ICancellable)cookie).Cancel(); | |
|
74 | static void CancelByTimeoutCallback(object cookie) { | |
|
75 | ((ICancellable)cookie).Cancel(new TimeoutException()); | |
|
82 | 76 | } |
|
83 | 77 | |
|
84 | 78 | /// <summary> |
@@ -89,7 +83,7 namespace Implab { | |||
|
89 | 83 | /// <typeparam name="TPromise">The 1st type parameter.</typeparam> |
|
90 | 84 | public static TPromise Timeout<TPromise>(this TPromise that, int milliseconds) where TPromise : IPromise { |
|
91 | 85 | Safe.ArgumentNotNull(that, "that"); |
|
92 | var timer = new Timer(CancelCallback, that, milliseconds, -1); | |
|
86 | var timer = new Timer(CancelByTimeoutCallback, that, milliseconds, -1); | |
|
93 | 87 | that.On(timer.Dispose, PromiseEventType.All); |
|
94 | 88 | return that; |
|
95 | 89 | } |
@@ -180,7 +174,6 namespace Implab { | |||
|
180 | 174 | |
|
181 | 175 | var d = new ActionTask(success, error, cancel, false); |
|
182 | 176 | that.On(d.Resolve, d.Reject, d.CancelOperation); |
|
183 | if (success != null) | |
|
184 | 177 |
|
|
185 | 178 | return d; |
|
186 | 179 | } |
@@ -198,7 +191,6 namespace Implab { | |||
|
198 | 191 | |
|
199 | 192 | var d = new FuncTask<T>(success, error, cancel, false); |
|
200 | 193 | that.On(d.Resolve, d.Reject, d.CancelOperation); |
|
201 | if (success != null) | |
|
202 | 194 |
|
|
203 | 195 | return d; |
|
204 | 196 | } |
@@ -215,7 +207,6 namespace Implab { | |||
|
215 | 207 | Safe.ArgumentNotNull(that, "that"); |
|
216 | 208 | var d = new FuncTask<T,T2>(success, error, cancel, false); |
|
217 | 209 | that.On(d.Resolve, d.Reject, d.CancelOperation); |
|
218 | if (success != null) | |
|
219 | 210 |
|
|
220 | 211 | return d; |
|
221 | 212 | } |
@@ -234,7 +225,6 namespace Implab { | |||
|
234 | 225 | |
|
235 | 226 | var d = new ActionChainTask(success, error, cancel, false); |
|
236 | 227 | that.On(d.Resolve, d.Reject, d.CancelOperation); |
|
237 | if (success != null) | |
|
238 | 228 |
|
|
239 | 229 | return d; |
|
240 | 230 | } |
@@ -41,6 +41,11 namespace Implab | |||
|
41 | 41 | throw new ArgumentOutOfRangeException(paramName); |
|
42 | 42 | } |
|
43 | 43 | |
|
44 | public static void ArgumentOfType(object value, Type type, string paramName) { | |
|
45 | if (!type.IsInstanceOfType(value)) | |
|
46 | throw new ArgumentException(String.Format("The parameter must be of type {0}", type), paramName); | |
|
47 | } | |
|
48 | ||
|
44 | 49 | public static void Dispose(params IDisposable[] objects) { |
|
45 | 50 | foreach (var d in objects) |
|
46 | 51 | if (d != null) |
@@ -32,6 +32,9 | |||
|
32 | 32 | </PropertyGroup> |
|
33 | 33 | <ItemGroup> |
|
34 | 34 | <Reference Include="System" /> |
|
35 | <Reference Include="System.Text.Json"> | |
|
36 | <HintPath>..\packages\System.Text.Json.2.0.0.11\lib\net40\System.Text.Json.dll</HintPath> | |
|
37 | </Reference> | |
|
35 | 38 | </ItemGroup> |
|
36 | 39 | <ItemGroup> |
|
37 | 40 | <Compile Include="Program.cs" /> |
@@ -44,4 +47,7 | |||
|
44 | 47 | <Name>Implab</Name> |
|
45 | 48 | </ProjectReference> |
|
46 | 49 | </ItemGroup> |
|
50 | <ItemGroup> | |
|
51 | <None Include="packages.config" /> | |
|
52 | </ItemGroup> | |
|
47 | 53 | </Project> No newline at end of file |
@@ -1,6 +1,9 | |||
|
1 | 1 | using System; |
|
2 | 2 | using Implab; |
|
3 | 3 | using System.Threading.Tasks; |
|
4 | using Implab.Formats.JSON; | |
|
5 | using System.IO; | |
|
6 | using System.Text.Json; | |
|
4 | 7 | |
|
5 | 8 | namespace MonoPlay { |
|
6 | 9 | class MainClass { |
@@ -9,28 +12,33 namespace MonoPlay { | |||
|
9 | 12 | public static void Main(string[] args) { |
|
10 | 13 | if (args == null) |
|
11 | 14 | throw new ArgumentNullException("args"); |
|
12 | ||
|
13 | var t1 = Environment.TickCount; | |
|
15 | int t1, t2; | |
|
14 | 16 | |
|
15 | DoWork().GetAwaiter().GetResult(); | |
|
17 | for (int i = 0; i < 2; i++) { | |
|
18 | t1 = Environment.TickCount; | |
|
19 | int elements =0; | |
|
20 | using (var reader = new JSONParser(File.OpenText("/home/sergey/temp/citylots.json"))) { | |
|
21 | while (reader.Read()) | |
|
22 | elements++; | |
|
23 | } | |
|
16 | 24 | |
|
17 |
|
|
|
18 |
Console.WriteLine("done: { |
|
|
19 | ||
|
25 | t2 = Environment.TickCount; | |
|
26 | Console.WriteLine("attempt {0} done: {1} ms, {2:.00} Mb, {3} GC, Elements: {4}",i+1, t2 - t1, GC.GetTotalMemory(false) / (1024*1024), GC.CollectionCount(0), elements ); | |
|
20 | 27 | } |
|
21 | 28 | |
|
22 | static IPromise<int> DoItem(int x) { | |
|
23 | //return Promise<int>.FromResult(x + 1); | |
|
24 | var p = new Promise<int>(); | |
|
25 | p.Resolve(x+1); | |
|
26 | return p; | |
|
29 | Console.WriteLine("Syste.Text.Json"); | |
|
30 | var paraser = new JsonParser(); | |
|
31 | for (int i = 0; i < 2; i++) { | |
|
32 | t1 = Environment.TickCount; | |
|
33 | using (var reader = File.OpenText("/home/sergey/temp/citylots.json")) { | |
|
34 | paraser.Parse(reader); | |
|
27 | 35 | } |
|
28 | 36 | |
|
29 | static async Task<int> DoWork() { | |
|
30 | var c = 0; | |
|
31 | for (int i = 0; i < 10000000; i++) | |
|
32 | c = await DoItem(c); | |
|
33 | return c; | |
|
37 | t2 = Environment.TickCount; | |
|
38 | Console.WriteLine("attempt {0} done: {1} ms, {2:.00} Mb, {3} GC, ",i+1, t2 - t1, GC.GetTotalMemory(false) / (1024*1024), GC.CollectionCount(0)); | |
|
39 | } | |
|
40 | ||
|
41 | ||
|
34 | 42 | } |
|
35 | 43 | |
|
36 | 44 | } |
@@ -1,4 +1,5 | |||
|
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
|
2 | 2 | <repositories> |
|
3 | 3 | <repository path="../Implab.Test/Implab.Format.Test/packages.config" /> |
|
4 | <repository path="../MonoPlay/packages.config" /> | |
|
4 | 5 | </repositories> No newline at end of file |
@@ -1,17 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Threading.Tasks; | |
|
6 | ||
|
7 | namespace Implab.JSON { | |
|
8 | /// <summary> | |
|
9 | /// internal | |
|
10 | /// </summary> | |
|
11 | public enum JSONElementContext { | |
|
12 | None, | |
|
13 | Object, | |
|
14 | Array, | |
|
15 | Closed | |
|
16 | } | |
|
17 | } |
@@ -1,34 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Threading.Tasks; | |
|
6 | ||
|
7 | namespace Implab.JSON { | |
|
8 | /// <summary> | |
|
9 | /// Тип элемента на котором находится парсер | |
|
10 | /// </summary> | |
|
11 | public enum JSONElementType { | |
|
12 | None, | |
|
13 | /// <summary> | |
|
14 | /// Начало объекта | |
|
15 | /// </summary> | |
|
16 | BeginObject, | |
|
17 | /// <summary> | |
|
18 | /// Конец объекта | |
|
19 | /// </summary> | |
|
20 | EndObject, | |
|
21 | /// <summary> | |
|
22 | /// Начало массива | |
|
23 | /// </summary> | |
|
24 | BeginArray, | |
|
25 | /// <summary> | |
|
26 | /// Конец массива | |
|
27 | /// </summary> | |
|
28 | EndArray, | |
|
29 | /// <summary> | |
|
30 | /// Простое значение | |
|
31 | /// </summary> | |
|
32 | Value | |
|
33 | } | |
|
34 | } |
@@ -1,99 +0,0 | |||
|
1 | using Implab.Parsing; | |
|
2 | using System.Linq; | |
|
3 | ||
|
4 | namespace Implab.JSON { | |
|
5 | class JSONGrammar : Grammar<JSONGrammar> { | |
|
6 | public enum TokenType { | |
|
7 | None, | |
|
8 | BeginObject, | |
|
9 | EndObject, | |
|
10 | BeginArray, | |
|
11 | EndArray, | |
|
12 | String, | |
|
13 | Number, | |
|
14 | Literal, | |
|
15 | NameSeparator, | |
|
16 | ValueSeparator, | |
|
17 | ||
|
18 | StringBound, | |
|
19 | EscapedChar, | |
|
20 | UnescapedChar, | |
|
21 | EscapedUnicode, | |
|
22 | ||
|
23 | Minus, | |
|
24 | Plus, | |
|
25 | Sign, | |
|
26 | Integer, | |
|
27 | Dot, | |
|
28 | Exp | |
|
29 | } | |
|
30 | ||
|
31 | readonly CDFADefinition m_jsonDFA; | |
|
32 | readonly CDFADefinition m_stringDFA; | |
|
33 | ||
|
34 | public JSONGrammar() { | |
|
35 | DefineAlphabet(Enumerable.Range(0, 0x20).Select(x => (char)x)); | |
|
36 | var hexDigit = SymbolRangeToken('a','f').Or(SymbolRangeToken('A','F')).Or(SymbolRangeToken('0','9')); | |
|
37 | var digit9 = SymbolRangeToken('1', '9'); | |
|
38 | var zero = SymbolToken('0'); | |
|
39 | var digit = zero.Or(digit9); | |
|
40 | var dot = SymbolToken('.'); | |
|
41 | var minus = SymbolToken('-'); | |
|
42 | var sign = SymbolSetToken('-', '+'); | |
|
43 | var expSign = SymbolSetToken('e', 'E'); | |
|
44 | var letters = SymbolRangeToken('a', 'z'); | |
|
45 | var integer = zero.Or(digit9.Cat(digit.EClosure())); | |
|
46 | var frac = dot.Cat(digit.Closure()); | |
|
47 | var exp = expSign.Cat(sign.Optional()).Cat(digit.Closure()); | |
|
48 | var quote = SymbolToken('"'); | |
|
49 | var backSlash = SymbolToken('\\'); | |
|
50 | var specialEscapeChars = SymbolSetToken('\\', '"', '/', 'b', 'f', 't', 'n', 'r'); | |
|
51 | var unicodeEspace = SymbolToken('u').Cat(hexDigit.Repeat(4)); | |
|
52 | var whitespace = SymbolSetToken('\n', '\r', '\t', ' ').EClosure(); | |
|
53 | var beginObject = whitespace.Cat(SymbolToken('{')).Cat(whitespace); | |
|
54 | var endObject = whitespace.Cat(SymbolToken('}')).Cat(whitespace); | |
|
55 | var beginArray = whitespace.Cat(SymbolToken('[')).Cat(whitespace); | |
|
56 | var endArray = whitespace.Cat(SymbolToken(']')).Cat(whitespace); | |
|
57 | var nameSep = whitespace.Cat(SymbolToken(':')).Cat(whitespace); | |
|
58 | var valueSep = whitespace.Cat(SymbolToken(',')).Cat(whitespace); | |
|
59 | ||
|
60 | var number = minus.Optional().Cat(integer).Cat(frac.Optional()).Cat(exp.Optional()); | |
|
61 | var literal = letters.Closure(); | |
|
62 | var unescaped = SymbolTokenExcept(Enumerable.Range(0, 0x20).Union(new int[] { '\\', '"' }).Select(x => (char)x)); | |
|
63 | ||
|
64 | var jsonExpression = | |
|
65 | number.Tag(TokenType.Number) | |
|
66 | .Or(literal.Tag(TokenType.Literal)) | |
|
67 | .Or(quote.Tag(TokenType.StringBound)) | |
|
68 | .Or(beginObject.Tag(TokenType.BeginObject)) | |
|
69 | .Or(endObject.Tag(TokenType.EndObject)) | |
|
70 | .Or(beginArray.Tag(TokenType.BeginArray)) | |
|
71 | .Or(endArray.Tag(TokenType.EndArray)) | |
|
72 | .Or(nameSep.Tag(TokenType.NameSeparator)) | |
|
73 | .Or(valueSep.Tag(TokenType.ValueSeparator)); | |
|
74 | ||
|
75 | ||
|
76 | var jsonStringExpression = | |
|
77 | quote.Tag(TokenType.StringBound) | |
|
78 | .Or(backSlash.Cat(specialEscapeChars).Tag(TokenType.EscapedChar)) | |
|
79 | .Or(backSlash.Cat(unicodeEspace).Tag(TokenType.EscapedUnicode)) | |
|
80 | .Or(unescaped.Closure().Tag(TokenType.UnescapedChar)); | |
|
81 | ||
|
82 | ||
|
83 | m_jsonDFA = BuildDFA(jsonExpression); | |
|
84 | m_stringDFA = BuildDFA(jsonStringExpression); | |
|
85 | } | |
|
86 | ||
|
87 | public CDFADefinition JsonDFA { | |
|
88 | get { | |
|
89 | return m_jsonDFA; | |
|
90 | } | |
|
91 | } | |
|
92 | ||
|
93 | public CDFADefinition JsonStringDFA { | |
|
94 | get { | |
|
95 | return m_stringDFA; | |
|
96 | } | |
|
97 | } | |
|
98 | } | |
|
99 | } |
@@ -1,277 +0,0 | |||
|
1 | using Implab.Parsing; | |
|
2 | using System; | |
|
3 | using System.Diagnostics; | |
|
4 | using System.IO; | |
|
5 | ||
|
6 | namespace Implab.JSON { | |
|
7 | /// <summary> | |
|
8 | /// internal | |
|
9 | /// </summary> | |
|
10 | public struct JSONParserContext { | |
|
11 | public string memberName; | |
|
12 | public JSONElementContext elementContext; | |
|
13 | } | |
|
14 | ||
|
15 | /// <summary> | |
|
16 | /// Pull парсер JSON данных. | |
|
17 | /// </summary> | |
|
18 | /// <remarks> | |
|
19 | /// Следует отметить отдельную интерпретацию свойства <see cref="Level"/>, | |
|
20 | /// оно означает текущий уровень вложенности объектов, однако закрывающий | |
|
21 | /// элемент объекта и массива имеет уровень меньше, чем сам объект. | |
|
22 | /// <code> | |
|
23 | /// { // Level = 1 | |
|
24 | /// "name" : "Peter", // Level = 1 | |
|
25 | /// "address" : { // Level = 2 | |
|
26 | /// city : "Stern" // Level = 2 | |
|
27 | /// } // Level = 1 | |
|
28 | /// } // Level = 0 | |
|
29 | /// </code> | |
|
30 | /// </remarks> | |
|
31 | public class JSONParser : DFAutomaton<JSONParserContext>, IDisposable { | |
|
32 | ||
|
33 | enum MemberContext { | |
|
34 | MemberName, | |
|
35 | MemberValue | |
|
36 | } | |
|
37 | ||
|
38 | static readonly EnumAlphabet<JsonTokenType> _alphabet = EnumAlphabet<JsonTokenType>.FullAlphabet; | |
|
39 | static readonly DFAStateDescriptior[] _jsonDFA; | |
|
40 | static readonly DFAStateDescriptior[] _objectDFA; | |
|
41 | static readonly DFAStateDescriptior[] _arrayDFA; | |
|
42 | ||
|
43 | static JSONParser() { | |
|
44 | ||
|
45 | ||
|
46 | var valueExpression = Token.New(JsonTokenType.BeginArray, JsonTokenType.BeginObject, JsonTokenType.Literal, JsonTokenType.Number, JsonTokenType.String); | |
|
47 | var memberExpression = Token.New(JsonTokenType.String).Cat(Token.New(JsonTokenType.NameSeparator)).Cat(valueExpression); | |
|
48 | ||
|
49 | var objectExpression = memberExpression | |
|
50 | .Cat( | |
|
51 | Token.New(JsonTokenType.ValueSeparator) | |
|
52 | .Cat(memberExpression) | |
|
53 | .EClosure() | |
|
54 | ) | |
|
55 | .Optional() | |
|
56 | .Cat(Token.New(JsonTokenType.EndObject)) | |
|
57 | .Tag(0); | |
|
58 | var arrayExpression = valueExpression | |
|
59 | .Cat( | |
|
60 | Token.New(JsonTokenType.ValueSeparator) | |
|
61 | .Cat(valueExpression) | |
|
62 | .EClosure() | |
|
63 | ) | |
|
64 | .Optional() | |
|
65 | .Cat(Token.New(JsonTokenType.EndArray)) | |
|
66 | .Tag(0); | |
|
67 | ||
|
68 | var jsonExpression = valueExpression.Tag(0); | |
|
69 | ||
|
70 | _jsonDFA = BuildDFA(jsonExpression).States; | |
|
71 | _objectDFA = BuildDFA(objectExpression).States; | |
|
72 | _arrayDFA = BuildDFA(arrayExpression).States; | |
|
73 | } | |
|
74 | ||
|
75 | static EDFADefinition<JsonTokenType> BuildDFA(Token expr) { | |
|
76 | var builder = new DFABuilder(); | |
|
77 | var dfa = new EDFADefinition<JsonTokenType>(_alphabet); | |
|
78 | expr.Accept(builder); | |
|
79 | ||
|
80 | builder.BuildDFA(dfa); | |
|
81 | return dfa; | |
|
82 | } | |
|
83 | ||
|
84 | JSONScanner m_scanner; | |
|
85 | MemberContext m_memberContext; | |
|
86 | ||
|
87 | JSONElementType m_elementType; | |
|
88 | object m_elementValue; | |
|
89 | ||
|
90 | /// <summary> | |
|
91 | /// Создает новый парсер на основе строки, содержащей JSON | |
|
92 | /// </summary> | |
|
93 | /// <param name="text"></param> | |
|
94 | public JSONParser(string text) | |
|
95 | : base(_jsonDFA, INITIAL_STATE, new JSONParserContext { elementContext = JSONElementContext.None, memberName = String.Empty }) { | |
|
96 | Safe.ArgumentNotEmpty(text, "text"); | |
|
97 | m_scanner = new JSONScanner(); | |
|
98 | m_scanner.Feed(text.ToCharArray()); | |
|
99 | } | |
|
100 | ||
|
101 | /// <summary> | |
|
102 | /// Создает новый экземпляр парсера, на основе текстового потока. | |
|
103 | /// </summary> | |
|
104 | /// <param name="reader">Текстовый поток.</param> | |
|
105 | /// <param name="dispose">Признак того, что парсер должен конролировать время жизни входного потока.</param> | |
|
106 | public JSONParser(TextReader reader, bool dispose) | |
|
107 | : base(_jsonDFA, INITIAL_STATE, new JSONParserContext { elementContext = JSONElementContext.None, memberName = String.Empty }) { | |
|
108 | Safe.ArgumentNotNull(reader, "reader"); | |
|
109 | m_scanner = new JSONScanner(); | |
|
110 | m_scanner.Feed(reader, dispose); | |
|
111 | } | |
|
112 | ||
|
113 | /// <summary> | |
|
114 | /// Тип текущего элемента на котором стоит парсер. | |
|
115 | /// </summary> | |
|
116 | public JSONElementType ElementType { | |
|
117 | get { return m_elementType; } | |
|
118 | } | |
|
119 | ||
|
120 | /// <summary> | |
|
121 | /// Имя элемента - имя свойства родительского контейнера. Для элементов массивов и корневого всегда | |
|
122 | /// пустая строка. | |
|
123 | /// </summary> | |
|
124 | public string ElementName { | |
|
125 | get { return m_context.info.memberName; } | |
|
126 | } | |
|
127 | ||
|
128 | /// <summary> | |
|
129 | /// Значение элемента. Только для элементов типа <see cref="JSONElementType.Value"/>, для остальных <c>null</c> | |
|
130 | /// </summary> | |
|
131 | public object ElementValue { | |
|
132 | get { return m_elementValue; } | |
|
133 | } | |
|
134 | ||
|
135 | /// <summary> | |
|
136 | /// Читает слеюудущий объект из потока | |
|
137 | /// </summary> | |
|
138 | /// <returns><c>true</c> - операция чтения прошла успешно, <c>false</c> - конец данных</returns> | |
|
139 | public bool Read() { | |
|
140 | if (m_context.current == UNREACHEBLE_STATE) | |
|
141 | throw new InvalidOperationException("The parser is in invalid state"); | |
|
142 | object tokenValue; | |
|
143 | JsonTokenType tokenType; | |
|
144 | m_context.info.memberName = String.Empty; | |
|
145 | while (m_scanner.ReadToken(out tokenValue, out tokenType)) { | |
|
146 | Move((int)tokenType); | |
|
147 | if (m_context.current == UNREACHEBLE_STATE) | |
|
148 | UnexpectedToken(tokenValue, tokenType); | |
|
149 | switch (tokenType) { | |
|
150 | case JsonTokenType.BeginObject: | |
|
151 | Switch( | |
|
152 | _objectDFA, | |
|
153 | INITIAL_STATE, | |
|
154 | new JSONParserContext { | |
|
155 | memberName = m_context.info.memberName, | |
|
156 | elementContext = JSONElementContext.Object | |
|
157 | } | |
|
158 | ); | |
|
159 | m_elementValue = null; | |
|
160 | m_memberContext = MemberContext.MemberName; | |
|
161 | m_elementType = JSONElementType.BeginObject; | |
|
162 | return true; | |
|
163 | case JsonTokenType.EndObject: | |
|
164 | Restore(); | |
|
165 | m_elementValue = null; | |
|
166 | m_elementType = JSONElementType.EndObject; | |
|
167 | return true; | |
|
168 | case JsonTokenType.BeginArray: | |
|
169 | Switch( | |
|
170 | _arrayDFA, | |
|
171 | INITIAL_STATE, | |
|
172 | new JSONParserContext { | |
|
173 | memberName = m_context.info.memberName, | |
|
174 | elementContext = JSONElementContext.Array | |
|
175 | } | |
|
176 | ); | |
|
177 | m_elementValue = null; | |
|
178 | m_memberContext = MemberContext.MemberValue; | |
|
179 | m_elementType = JSONElementType.BeginArray; | |
|
180 | return true; | |
|
181 | case JsonTokenType.EndArray: | |
|
182 | Restore(); | |
|
183 | m_elementValue = null; | |
|
184 | m_elementType = JSONElementType.EndArray; | |
|
185 | return true; | |
|
186 | case JsonTokenType.String: | |
|
187 | if (m_memberContext == MemberContext.MemberName) { | |
|
188 | m_context.info.memberName = (string)tokenValue; | |
|
189 | break; | |
|
190 | } | |
|
191 | m_elementType = JSONElementType.Value; | |
|
192 | m_elementValue = tokenValue; | |
|
193 | return true; | |
|
194 | case JsonTokenType.Number: | |
|
195 | m_elementType = JSONElementType.Value; | |
|
196 | m_elementValue = tokenValue; | |
|
197 | return true; | |
|
198 | case JsonTokenType.Literal: | |
|
199 | m_elementType = JSONElementType.Value; | |
|
200 | m_elementValue = ParseLiteral((string)tokenValue); | |
|
201 | return true; | |
|
202 | case JsonTokenType.NameSeparator: | |
|
203 | m_memberContext = MemberContext.MemberValue; | |
|
204 | break; | |
|
205 | case JsonTokenType.ValueSeparator: | |
|
206 | m_memberContext = m_context.info.elementContext == JSONElementContext.Object ? MemberContext.MemberName : MemberContext.MemberValue; | |
|
207 | break; | |
|
208 | default: | |
|
209 | UnexpectedToken(tokenValue, tokenType); | |
|
210 | break; | |
|
211 | } | |
|
212 | } | |
|
213 | if (m_context.info.elementContext != JSONElementContext.None) | |
|
214 | throw new ParserException("Unexpedted end of data"); | |
|
215 | return false; | |
|
216 | } | |
|
217 | ||
|
218 | object ParseLiteral(string literal) { | |
|
219 | switch (literal) { | |
|
220 | case "null": | |
|
221 | return null; | |
|
222 | case "false": | |
|
223 | return false; | |
|
224 | case "true": | |
|
225 | return true; | |
|
226 | default: | |
|
227 | UnexpectedToken(literal, JsonTokenType.Literal); | |
|
228 | return null; // avoid compliler error | |
|
229 | } | |
|
230 | } | |
|
231 | ||
|
232 | void UnexpectedToken(object value, JsonTokenType tokenType) { | |
|
233 | throw new ParserException(String.Format("Unexpected token {0}: '{1}'", tokenType, value)); | |
|
234 | } | |
|
235 | ||
|
236 | ||
|
237 | /// <summary> | |
|
238 | /// Признак конца потока | |
|
239 | /// </summary> | |
|
240 | public bool EOF { | |
|
241 | get { | |
|
242 | return m_scanner.EOF; | |
|
243 | } | |
|
244 | } | |
|
245 | ||
|
246 | protected virtual void Dispose(bool disposing) { | |
|
247 | if (disposing) { | |
|
248 | m_scanner.Dispose(); | |
|
249 | } | |
|
250 | } | |
|
251 | ||
|
252 | /// <summary> | |
|
253 | /// Освобождает парсер и связанный с ним сканнер. | |
|
254 | /// </summary> | |
|
255 | public void Dispose() { | |
|
256 | Dispose(true); | |
|
257 | GC.SuppressFinalize(this); | |
|
258 | } | |
|
259 | ||
|
260 | ~JSONParser() { | |
|
261 | Dispose(false); | |
|
262 | } | |
|
263 | ||
|
264 | /// <summary> | |
|
265 | /// Переходит в конец текущего объекта. | |
|
266 | /// </summary> | |
|
267 | public void SeekElementEnd() { | |
|
268 | var level = Level - 1; | |
|
269 | ||
|
270 | Debug.Assert(level >= 0); | |
|
271 | ||
|
272 | while (Level != level) | |
|
273 | Read(); | |
|
274 | } | |
|
275 | } | |
|
276 | ||
|
277 | } |
@@ -1,100 +0,0 | |||
|
1 | using Implab.Parsing; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Globalization; | |
|
5 | using System.Linq; | |
|
6 | using System.Text; | |
|
7 | using System.Threading.Tasks; | |
|
8 | ||
|
9 | namespace Implab.JSON { | |
|
10 | /// <summary> | |
|
11 | /// Сканнер (лексер), разбивающий поток символов на токены JSON. | |
|
12 | /// </summary> | |
|
13 | public class JSONScanner : Scanner { | |
|
14 | char[] m_stringBuffer; | |
|
15 | DFAStateDescriptior[] m_stringDFA; | |
|
16 | int[] m_stringAlphabet; | |
|
17 | ||
|
18 | /// <summary> | |
|
19 | /// Создает новый экземпляр сканнера | |
|
20 | /// </summary> | |
|
21 | public JSONScanner() | |
|
22 | : base(JSONGrammar.Instance.JsonDFA.States, JSONGrammar.Instance.JsonDFA.Alphabet.GetTranslationMap()) { | |
|
23 | m_stringBuffer = new char[1024]; | |
|
24 | var dfa = JSONGrammar.Instance.JsonStringDFA; | |
|
25 | m_stringAlphabet = dfa.Alphabet.GetTranslationMap(); | |
|
26 | m_stringDFA = dfa.States; | |
|
27 | } | |
|
28 | ||
|
29 | /// <summary> | |
|
30 | /// Читает следующий лексический элемент из входных данных. | |
|
31 | /// </summary> | |
|
32 | /// <param name="tokenValue">Возвращает значение прочитанного токена.</param> | |
|
33 | /// <param name="tokenType">Возвращает тип прочитанного токена.</param> | |
|
34 | /// <returns><c>true</c> - чтение произведено успешно. <c>false</c> - достигнут конец входных данных</returns> | |
|
35 | /// <remarks>В случе если токен не распознается, возникает исключение. Значения токенов обрабатываются, т.е. | |
|
36 | /// в строках обрабатываются экранированные символы, числа становтся типа double.</remarks> | |
|
37 | public bool ReadToken(out object tokenValue, out JsonTokenType tokenType) { | |
|
38 | if (ReadTokenInternal()) { | |
|
39 | switch ((JSONGrammar.TokenType)m_currentState.tag[0]) { | |
|
40 | case JSONGrammar.TokenType.StringBound: | |
|
41 | tokenValue = ReadString(); | |
|
42 | tokenType = JsonTokenType.String; | |
|
43 | break; | |
|
44 | case JSONGrammar.TokenType.Number: | |
|
45 | tokenValue = Double.Parse(new String(m_buffer, m_tokenOffset, m_tokenLen), CultureInfo.InvariantCulture); | |
|
46 | tokenType = JsonTokenType.Number; | |
|
47 | break; | |
|
48 | default: | |
|
49 | tokenType = (JsonTokenType)m_currentState.tag[0]; | |
|
50 | tokenValue = new String(m_buffer, m_tokenOffset, m_tokenLen); | |
|
51 | break; | |
|
52 | } | |
|
53 | return true; | |
|
54 | } | |
|
55 | tokenValue = null; | |
|
56 | tokenType = JsonTokenType.None; | |
|
57 | return false; | |
|
58 | } | |
|
59 | ||
|
60 | string ReadString() { | |
|
61 | int pos = 0; | |
|
62 | Switch(m_stringDFA, m_stringAlphabet); | |
|
63 | while (ReadTokenInternal()) { | |
|
64 | switch ((JSONGrammar.TokenType)m_currentState.tag[0]) { | |
|
65 | case JSONGrammar.TokenType.StringBound: | |
|
66 | Restore(); | |
|
67 | return new String(m_stringBuffer, 0, pos); | |
|
68 | case JSONGrammar.TokenType.UnescapedChar: | |
|
69 | EnsureStringBufferSize(pos + m_tokenLen); | |
|
70 | Array.Copy(m_buffer, m_tokenOffset, m_stringBuffer, pos, m_tokenLen); | |
|
71 | pos += m_tokenLen; | |
|
72 | break; | |
|
73 | case JSONGrammar.TokenType.EscapedUnicode: | |
|
74 | EnsureStringBufferSize(pos + 1); | |
|
75 | m_stringBuffer[pos] = StringTranslator.TranslateHexUnicode(m_buffer, m_tokenOffset + 2); | |
|
76 | pos++; | |
|
77 | break; | |
|
78 | case JSONGrammar.TokenType.EscapedChar: | |
|
79 | EnsureStringBufferSize(pos + 1); | |
|
80 | m_stringBuffer[pos] = StringTranslator.TranslateEscapedChar(m_buffer[m_tokenOffset + 1]); | |
|
81 | pos++; | |
|
82 | break; | |
|
83 | default: | |
|
84 | break; | |
|
85 | } | |
|
86 | ||
|
87 | } | |
|
88 | ||
|
89 | throw new ParserException("Unexpected end of data"); | |
|
90 | } | |
|
91 | ||
|
92 | void EnsureStringBufferSize(int size) { | |
|
93 | if (size > m_stringBuffer.Length) { | |
|
94 | var newBuffer = new char[size]; | |
|
95 | m_stringBuffer.CopyTo(newBuffer, 0); | |
|
96 | m_stringBuffer = newBuffer; | |
|
97 | } | |
|
98 | } | |
|
99 | } | |
|
100 | } |
@@ -1,319 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.IO; | |
|
4 | using System.Globalization; | |
|
5 | using System.Diagnostics; | |
|
6 | ||
|
7 | namespace Implab.JSON { | |
|
8 | public class JSONWriter { | |
|
9 | struct Context { | |
|
10 | public bool needComma; | |
|
11 | public JSONElementContext element; | |
|
12 | } | |
|
13 | Stack<Context> m_contextStack = new Stack<Context>(); | |
|
14 | Context m_context; | |
|
15 | ||
|
16 | const int BUFFER_SIZE = 64; | |
|
17 | ||
|
18 | TextWriter m_writer; | |
|
19 | readonly bool m_indent = true; | |
|
20 | readonly int m_indentSize = 4; | |
|
21 | readonly char[] m_buffer = new char[BUFFER_SIZE]; | |
|
22 | int m_bufferPos; | |
|
23 | ||
|
24 | static readonly char [] _hex = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; | |
|
25 | static readonly char [] _escapeBKS, | |
|
26 | _escapeFWD, | |
|
27 | _escapeCR, | |
|
28 | _escapeNL, | |
|
29 | _escapeTAB, | |
|
30 | _escapeBSLASH, | |
|
31 | _escapeQ; | |
|
32 | ||
|
33 | static JSONWriter() { | |
|
34 | _escapeBKS = "\\b".ToCharArray(); | |
|
35 | _escapeFWD = "\\f".ToCharArray(); | |
|
36 | _escapeCR = "\\r".ToCharArray(); | |
|
37 | _escapeNL = "\\n".ToCharArray(); | |
|
38 | _escapeTAB = "\\t".ToCharArray(); | |
|
39 | _escapeBSLASH = "\\\\".ToCharArray(); | |
|
40 | _escapeQ = "\\\"".ToCharArray(); | |
|
41 | } | |
|
42 | ||
|
43 | public JSONWriter(TextWriter writer) { | |
|
44 | Safe.ArgumentNotNull(writer, "writer"); | |
|
45 | m_writer = writer; | |
|
46 | } | |
|
47 | ||
|
48 | public JSONWriter(TextWriter writer, bool indent) { | |
|
49 | Safe.ArgumentNotNull(writer, "writer"); | |
|
50 | ||
|
51 | m_writer = writer; | |
|
52 | m_indent = indent; | |
|
53 | } | |
|
54 | ||
|
55 | void WriteIndent() { | |
|
56 | if (m_indent) { | |
|
57 | var indent = new char[m_contextStack.Count * m_indentSize + 1]; | |
|
58 | indent[0] = '\n'; | |
|
59 | for (int i = 1; i < indent.Length; i++) | |
|
60 | indent[i] = ' '; | |
|
61 | m_writer.Write(new String(indent)); | |
|
62 | } else { | |
|
63 | m_writer.Write(' '); | |
|
64 | } | |
|
65 | } | |
|
66 | ||
|
67 | void WriteMemberName(string name) { | |
|
68 | Safe.ArgumentNotEmpty(name, "name"); | |
|
69 | if (m_context.element != JSONElementContext.Object) | |
|
70 | OperationNotApplicable("WriteMember"); | |
|
71 | if (m_context.needComma) | |
|
72 | m_writer.Write(","); | |
|
73 | ||
|
74 | WriteIndent(); | |
|
75 | m_context.needComma = true; | |
|
76 | Write(name); | |
|
77 | m_writer.Write(" : "); | |
|
78 | } | |
|
79 | ||
|
80 | public void WriteValue(string name, string value) { | |
|
81 | WriteMemberName(name); | |
|
82 | Write(value); | |
|
83 | } | |
|
84 | ||
|
85 | public void WriteValue(string name, bool value) { | |
|
86 | WriteMemberName(name); | |
|
87 | Write(value); | |
|
88 | } | |
|
89 | ||
|
90 | public void WriteValue(string name, double value) { | |
|
91 | WriteMemberName(name); | |
|
92 | Write(value); | |
|
93 | } | |
|
94 | ||
|
95 | public void WriteValue(string value) { | |
|
96 | if (m_context.element == JSONElementContext.Array) { | |
|
97 | ||
|
98 | if (m_context.needComma) | |
|
99 | m_writer.Write(","); | |
|
100 | WriteIndent(); | |
|
101 | m_context.needComma = true; | |
|
102 | ||
|
103 | Write(value); | |
|
104 | } else if (m_context.element == JSONElementContext.None) { | |
|
105 | Write(value); | |
|
106 | m_context.element = JSONElementContext.Closed; | |
|
107 | } else { | |
|
108 | OperationNotApplicable("WriteValue"); | |
|
109 | } | |
|
110 | } | |
|
111 | ||
|
112 | public void WriteValue(bool value) { | |
|
113 | if (m_context.element == JSONElementContext.Array) { | |
|
114 | ||
|
115 | if (m_context.needComma) | |
|
116 | m_writer.Write(","); | |
|
117 | WriteIndent(); | |
|
118 | m_context.needComma = true; | |
|
119 | ||
|
120 | Write(value); | |
|
121 | } else if (m_context.element == JSONElementContext.None) { | |
|
122 | Write(value); | |
|
123 | m_context.element = JSONElementContext.Closed; | |
|
124 | } else { | |
|
125 | OperationNotApplicable("WriteValue"); | |
|
126 | } | |
|
127 | } | |
|
128 | ||
|
129 | public void WriteValue(double value) { | |
|
130 | if (m_context.element == JSONElementContext.Array) { | |
|
131 | ||
|
132 | if (m_context.needComma) | |
|
133 | m_writer.Write(","); | |
|
134 | WriteIndent(); | |
|
135 | m_context.needComma = true; | |
|
136 | ||
|
137 | Write(value); | |
|
138 | } else if (m_context.element == JSONElementContext.None) { | |
|
139 | Write(value); | |
|
140 | m_context.element = JSONElementContext.Closed; | |
|
141 | } else { | |
|
142 | OperationNotApplicable("WriteValue"); | |
|
143 | } | |
|
144 | } | |
|
145 | ||
|
146 | public void BeginObject() { | |
|
147 | if (m_context.element != JSONElementContext.None && m_context.element != JSONElementContext.Array) | |
|
148 | OperationNotApplicable("BeginObject"); | |
|
149 | if (m_context.needComma) | |
|
150 | m_writer.Write(","); | |
|
151 | ||
|
152 | WriteIndent(); | |
|
153 | ||
|
154 | m_context.needComma = true; | |
|
155 | ||
|
156 | m_contextStack.Push(m_context); | |
|
157 | ||
|
158 | m_context = new Context { element = JSONElementContext.Object, needComma = false }; | |
|
159 | m_writer.Write("{"); | |
|
160 | } | |
|
161 | ||
|
162 | public void BeginObject(string name) { | |
|
163 | WriteMemberName(name); | |
|
164 | ||
|
165 | m_contextStack.Push(m_context); | |
|
166 | ||
|
167 | m_context = new Context { element = JSONElementContext.Object, needComma = false }; | |
|
168 | m_writer.Write("{"); | |
|
169 | } | |
|
170 | ||
|
171 | public void EndObject() { | |
|
172 | if (m_context.element != JSONElementContext.Object) | |
|
173 | OperationNotApplicable("EndObject"); | |
|
174 | ||
|
175 | m_context = m_contextStack.Pop(); | |
|
176 | if (m_contextStack.Count == 0) | |
|
177 | m_context.element = JSONElementContext.Closed; | |
|
178 | WriteIndent(); | |
|
179 | m_writer.Write("}"); | |
|
180 | } | |
|
181 | ||
|
182 | public void BeginArray() { | |
|
183 | if (m_context.element != JSONElementContext.None && m_context.element != JSONElementContext.Array) | |
|
184 | throw new InvalidOperationException(); | |
|
185 | if (m_context.needComma) { | |
|
186 | m_writer.Write(","); | |
|
187 | ||
|
188 | } | |
|
189 | m_context.needComma = true; | |
|
190 | ||
|
191 | WriteIndent(); | |
|
192 | m_contextStack.Push(m_context); | |
|
193 | m_context = new Context { element = JSONElementContext.Array, needComma = false }; | |
|
194 | m_writer.Write("["); | |
|
195 | } | |
|
196 | ||
|
197 | public void BeginArray(string name) { | |
|
198 | WriteMemberName(name); | |
|
199 | ||
|
200 | m_contextStack.Push(m_context); | |
|
201 | ||
|
202 | m_context = new Context { element = JSONElementContext.Array, needComma = false }; | |
|
203 | m_writer.Write("["); | |
|
204 | } | |
|
205 | ||
|
206 | public void EndArray() { | |
|
207 | if (m_context.element != JSONElementContext.Array) | |
|
208 | OperationNotApplicable("EndArray"); | |
|
209 | ||
|
210 | m_context = m_contextStack.Pop(); | |
|
211 | if (m_contextStack.Count == 0) | |
|
212 | m_context.element = JSONElementContext.Closed; | |
|
213 | WriteIndent(); | |
|
214 | m_writer.Write("]"); | |
|
215 | } | |
|
216 | ||
|
217 | void Write(bool value) { | |
|
218 | m_writer.Write(value ? "true" : "false"); | |
|
219 | } | |
|
220 | ||
|
221 | void FlushBuffer() { | |
|
222 | if (m_bufferPos > 0) { | |
|
223 | m_writer.Write(m_buffer, 0, m_bufferPos); | |
|
224 | m_bufferPos = 0; | |
|
225 | } | |
|
226 | } | |
|
227 | ||
|
228 | void Write(string value) { | |
|
229 | if (value == null) { | |
|
230 | m_writer.Write("null"); | |
|
231 | return; | |
|
232 | } | |
|
233 | ||
|
234 | Debug.Assert(m_bufferPos == 0); | |
|
235 | ||
|
236 | var chars = value.ToCharArray(); | |
|
237 | m_buffer[m_bufferPos++] = '"'; | |
|
238 | ||
|
239 | // Analysis disable once ForCanBeConvertedToForeach | |
|
240 | for (int i = 0; i < chars.Length; i++) { | |
|
241 | var ch = chars[i]; | |
|
242 | ||
|
243 | char[] escapeSeq; | |
|
244 | ||
|
245 | switch (ch) { | |
|
246 | case '\b': | |
|
247 | escapeSeq = _escapeBKS; | |
|
248 | break; | |
|
249 | case '\f': | |
|
250 | escapeSeq = _escapeFWD; | |
|
251 | break; | |
|
252 | case '\r': | |
|
253 | escapeSeq = _escapeCR; | |
|
254 | break; | |
|
255 | case '\n': | |
|
256 | escapeSeq = _escapeNL; | |
|
257 | break; | |
|
258 | case '\t': | |
|
259 | escapeSeq = _escapeTAB; | |
|
260 | break; | |
|
261 | case '\\': | |
|
262 | escapeSeq = _escapeBSLASH; | |
|
263 | break; | |
|
264 | case '"': | |
|
265 | escapeSeq = _escapeQ; | |
|
266 | break; | |
|
267 | default: | |
|
268 | if (ch < 0x20) { | |
|
269 | if (m_bufferPos + 6 > BUFFER_SIZE) | |
|
270 | FlushBuffer(); | |
|
271 | ||
|
272 | m_buffer[m_bufferPos++] = '\\'; | |
|
273 | m_buffer[m_bufferPos++] = 'u'; | |
|
274 | m_buffer[m_bufferPos++] = '0'; | |
|
275 | m_buffer[m_bufferPos++] = '0'; | |
|
276 | m_buffer[m_bufferPos++] = _hex[ch >> 4 & 0xf]; | |
|
277 | m_buffer[m_bufferPos++] = _hex[ch & 0xf]; | |
|
278 | ||
|
279 | } else { | |
|
280 | if (m_bufferPos >= BUFFER_SIZE) | |
|
281 | FlushBuffer(); | |
|
282 | m_buffer[m_bufferPos++] = ch; | |
|
283 | } | |
|
284 | continue; | |
|
285 | } | |
|
286 | ||
|
287 | if (m_bufferPos + escapeSeq.Length > BUFFER_SIZE) | |
|
288 | FlushBuffer(); | |
|
289 | ||
|
290 | Array.Copy(escapeSeq, 0, m_buffer, m_bufferPos, escapeSeq.Length); | |
|
291 | m_bufferPos += escapeSeq.Length; | |
|
292 | ||
|
293 | } | |
|
294 | ||
|
295 | if (m_bufferPos >= BUFFER_SIZE) | |
|
296 | FlushBuffer(); | |
|
297 | ||
|
298 | m_buffer[m_bufferPos++] = '"'; | |
|
299 | ||
|
300 | FlushBuffer(); | |
|
301 | } | |
|
302 | ||
|
303 | void Write(double value) { | |
|
304 | if (double.IsNaN(value)) | |
|
305 | Write("NaN"); | |
|
306 | else if (double.IsNegativeInfinity(value)) | |
|
307 | Write("-Infinity"); | |
|
308 | else if (double.IsPositiveInfinity(value)) | |
|
309 | Write("Infinity"); | |
|
310 | else | |
|
311 | m_writer.Write(value.ToString(CultureInfo.InvariantCulture)); | |
|
312 | } | |
|
313 | ||
|
314 | void OperationNotApplicable(string opName) { | |
|
315 | throw new InvalidOperationException(String.Format("The operation '{0}' isn't applicable in the context of '{1}'", opName, m_context.element )); | |
|
316 | } | |
|
317 | ||
|
318 | } | |
|
319 | } |
@@ -1,343 +0,0 | |||
|
1 | using Implab; | |
|
2 | using Implab.Parsing; | |
|
3 | using System; | |
|
4 | using System.Collections.Generic; | |
|
5 | using System.Globalization; | |
|
6 | using System.IO; | |
|
7 | using System.Linq; | |
|
8 | using System.Text; | |
|
9 | using System.Threading.Tasks; | |
|
10 | using System.Xml; | |
|
11 | ||
|
12 | namespace Implab.JSON { | |
|
13 | public class JSONXmlReader : XmlReader { | |
|
14 | ||
|
15 | enum ValueContext { | |
|
16 | Undefined, | |
|
17 | ElementStart, | |
|
18 | ElementValue, | |
|
19 | ElementEnd, | |
|
20 | ElementEmpty | |
|
21 | } | |
|
22 | ||
|
23 | struct LocalNameContext { | |
|
24 | public string localName; | |
|
25 | public bool isArray; | |
|
26 | } | |
|
27 | ||
|
28 | JSONParser m_parser; | |
|
29 | ValueContext m_valueContext; | |
|
30 | ReadState m_state = ReadState.Initial; | |
|
31 | Stack<LocalNameContext> m_localNameStack = new Stack<LocalNameContext>(); | |
|
32 | LocalNameContext m_localName; | |
|
33 | int m_depthCorrection = 0; | |
|
34 | ||
|
35 | readonly string m_rootName; | |
|
36 | readonly string m_prefix; | |
|
37 | readonly string m_namespaceUri; | |
|
38 | readonly bool m_flattenArrays; | |
|
39 | readonly string m_arrayItemName; | |
|
40 | readonly XmlNameTable m_nameTable; | |
|
41 | ||
|
42 | JSONXmlReader(JSONParser parser, JSONXmlReaderOptions options) { | |
|
43 | m_parser = parser; | |
|
44 | ||
|
45 | if (options != null) { | |
|
46 | m_prefix = options.NodesPrefix ?? String.Empty; | |
|
47 | m_namespaceUri = options.NamespaceURI ?? String.Empty; | |
|
48 | m_rootName = options.RootName ?? "json"; | |
|
49 | m_flattenArrays = options.FlattenArrays; | |
|
50 | m_arrayItemName = options.ArrayItemName ?? "item"; | |
|
51 | m_nameTable = options.NameTable ?? new NameTable(); | |
|
52 | } else { | |
|
53 | m_prefix = String.Empty; | |
|
54 | m_namespaceUri = String.Empty; | |
|
55 | m_rootName = "json"; | |
|
56 | m_flattenArrays = false; | |
|
57 | m_arrayItemName = "item"; | |
|
58 | m_nameTable = new NameTable(); | |
|
59 | } | |
|
60 | } | |
|
61 | ||
|
62 | /// <summary> | |
|
63 | /// Always 0, JSON doesn't support attributes | |
|
64 | /// </summary> | |
|
65 | public override int AttributeCount { | |
|
66 | get { return 0; } | |
|
67 | } | |
|
68 | ||
|
69 | public override string BaseURI { | |
|
70 | get { return String.Empty; } | |
|
71 | } | |
|
72 | ||
|
73 | public override int Depth { | |
|
74 | get { | |
|
75 | return m_localNameStack.Count + m_depthCorrection; | |
|
76 | } | |
|
77 | } | |
|
78 | ||
|
79 | public override bool EOF { | |
|
80 | get { return m_parser.EOF; } | |
|
81 | } | |
|
82 | ||
|
83 | /// <summary> | |
|
84 | /// Always throws an exception | |
|
85 | /// </summary> | |
|
86 | /// <param name="i"></param> | |
|
87 | /// <returns></returns> | |
|
88 | public override string GetAttribute(int i) { | |
|
89 | throw new ArgumentOutOfRangeException(); | |
|
90 | } | |
|
91 | ||
|
92 | /// <summary> | |
|
93 | /// Always returns empty string | |
|
94 | /// </summary> | |
|
95 | /// <param name="name"></param> | |
|
96 | /// <param name="namespaceURI"></param> | |
|
97 | /// <returns></returns> | |
|
98 | public override string GetAttribute(string name, string namespaceURI) { | |
|
99 | return String.Empty; | |
|
100 | } | |
|
101 | ||
|
102 | /// <summary> | |
|
103 | /// Always returns empty string | |
|
104 | /// </summary> | |
|
105 | /// <param name="name"></param> | |
|
106 | /// <returns></returns> | |
|
107 | public override string GetAttribute(string name) { | |
|
108 | return String.Empty; | |
|
109 | } | |
|
110 | ||
|
111 | public override bool IsEmptyElement { | |
|
112 | get { return m_parser.ElementType == JSONElementType.Value && m_valueContext == ValueContext.ElementEmpty; } | |
|
113 | } | |
|
114 | ||
|
115 | public override string LocalName { | |
|
116 | get { return m_localName.localName; } | |
|
117 | } | |
|
118 | ||
|
119 | public override string LookupNamespace(string prefix) { | |
|
120 | if (String.IsNullOrEmpty(prefix) || prefix == m_prefix) | |
|
121 | return m_namespaceUri; | |
|
122 | else | |
|
123 | return String.Empty; | |
|
124 | } | |
|
125 | ||
|
126 | public override bool MoveToAttribute(string name, string ns) { | |
|
127 | return false; | |
|
128 | } | |
|
129 | ||
|
130 | public override bool MoveToAttribute(string name) { | |
|
131 | return false; | |
|
132 | } | |
|
133 | ||
|
134 | public override bool MoveToElement() { | |
|
135 | return false; | |
|
136 | } | |
|
137 | ||
|
138 | public override bool MoveToFirstAttribute() { | |
|
139 | return false; | |
|
140 | } | |
|
141 | ||
|
142 | public override bool MoveToNextAttribute() { | |
|
143 | return false; | |
|
144 | } | |
|
145 | ||
|
146 | public override XmlNameTable NameTable { | |
|
147 | get { return m_nameTable; } | |
|
148 | } | |
|
149 | ||
|
150 | public override string NamespaceURI { | |
|
151 | get { return m_namespaceUri; } | |
|
152 | } | |
|
153 | ||
|
154 | public override XmlNodeType NodeType { | |
|
155 | get { | |
|
156 | switch (m_parser.ElementType) { | |
|
157 | case JSONElementType.BeginObject: | |
|
158 | case JSONElementType.BeginArray: | |
|
159 | return XmlNodeType.Element; | |
|
160 | case JSONElementType.EndObject: | |
|
161 | case JSONElementType.EndArray: | |
|
162 | return XmlNodeType.EndElement; | |
|
163 | case JSONElementType.Value: | |
|
164 | switch (m_valueContext) { | |
|
165 | case ValueContext.ElementStart: | |
|
166 | case ValueContext.ElementEmpty: | |
|
167 | return XmlNodeType.Element; | |
|
168 | case ValueContext.ElementValue: | |
|
169 | return XmlNodeType.Text; | |
|
170 | case ValueContext.ElementEnd: | |
|
171 | return XmlNodeType.EndElement; | |
|
172 | default: | |
|
173 | throw new InvalidOperationException(); | |
|
174 | } | |
|
175 | default: | |
|
176 | throw new InvalidOperationException(); | |
|
177 | } | |
|
178 | } | |
|
179 | } | |
|
180 | ||
|
181 | public override string Prefix { | |
|
182 | get { return m_prefix; } | |
|
183 | } | |
|
184 | ||
|
185 | public override bool Read() { | |
|
186 | if (m_state != System.Xml.ReadState.Interactive && m_state != System.Xml.ReadState.Initial) | |
|
187 | return false; | |
|
188 | ||
|
189 | if (m_state == ReadState.Initial) | |
|
190 | m_state = System.Xml.ReadState.Interactive; | |
|
191 | ||
|
192 | try { | |
|
193 | switch (m_parser.ElementType) { | |
|
194 | case JSONElementType.Value: | |
|
195 | switch (m_valueContext) { | |
|
196 | case ValueContext.ElementStart: | |
|
197 | SetLocalName(String.Empty); | |
|
198 | m_valueContext = ValueContext.ElementValue; | |
|
199 | return true; | |
|
200 | case ValueContext.ElementValue: | |
|
201 | RestoreLocalName(); | |
|
202 | m_valueContext = ValueContext.ElementEnd; | |
|
203 | return true; | |
|
204 | case ValueContext.ElementEmpty: | |
|
205 | case ValueContext.ElementEnd: | |
|
206 | RestoreLocalName(); | |
|
207 | break; | |
|
208 | } | |
|
209 | break; | |
|
210 | case JSONElementType.EndArray: | |
|
211 | case JSONElementType.EndObject: | |
|
212 | RestoreLocalName(); | |
|
213 | break; | |
|
214 | } | |
|
215 | string itemName = m_parser.ElementType == JSONElementType.None ? m_rootName : m_flattenArrays ? m_localName.localName : m_arrayItemName; | |
|
216 | while (m_parser.Read()) { | |
|
217 | if (!String.IsNullOrEmpty(m_parser.ElementName)) | |
|
218 | itemName = m_parser.ElementName; | |
|
219 | ||
|
220 | switch (m_parser.ElementType) { | |
|
221 | case JSONElementType.BeginArray: | |
|
222 | if (m_flattenArrays && !m_localName.isArray) { | |
|
223 | m_depthCorrection--; | |
|
224 | SetLocalName(itemName, true); | |
|
225 | continue; | |
|
226 | } else { | |
|
227 | SetLocalName(itemName, true); | |
|
228 | } | |
|
229 | break; | |
|
230 | case JSONElementType.BeginObject: | |
|
231 | SetLocalName(itemName); | |
|
232 | break; | |
|
233 | case JSONElementType.EndArray: | |
|
234 | if (m_flattenArrays && !m_localNameStack.Peek().isArray) { | |
|
235 | RestoreLocalName(); | |
|
236 | m_depthCorrection++; | |
|
237 | continue; | |
|
238 | } | |
|
239 | break; | |
|
240 | case JSONElementType.EndObject: | |
|
241 | break; | |
|
242 | case JSONElementType.Value: | |
|
243 | SetLocalName(itemName); | |
|
244 | m_valueContext = m_parser.ElementValue == null ? ValueContext.ElementEmpty : ValueContext.ElementStart; | |
|
245 | break; | |
|
246 | default: | |
|
247 | break; | |
|
248 | } | |
|
249 | return true; | |
|
250 | } | |
|
251 | ||
|
252 | m_state = System.Xml.ReadState.EndOfFile; | |
|
253 | return false; | |
|
254 | } catch { | |
|
255 | m_state = System.Xml.ReadState.Error; | |
|
256 | throw; | |
|
257 | } | |
|
258 | } | |
|
259 | ||
|
260 | public override bool ReadAttributeValue() { | |
|
261 | return false; | |
|
262 | } | |
|
263 | ||
|
264 | public override ReadState ReadState { | |
|
265 | get { return m_state; } | |
|
266 | } | |
|
267 | ||
|
268 | public override void ResolveEntity() { | |
|
269 | // do nothing | |
|
270 | } | |
|
271 | ||
|
272 | public override string Value { | |
|
273 | get { | |
|
274 | if (m_parser.ElementValue == null) | |
|
275 | return String.Empty; | |
|
276 | if (Convert.GetTypeCode(m_parser.ElementValue) == TypeCode.Double) | |
|
277 | return ((double)m_parser.ElementValue).ToString(CultureInfo.InvariantCulture); | |
|
278 | else | |
|
279 | return m_parser.ElementValue.ToString(); | |
|
280 | } | |
|
281 | } | |
|
282 | ||
|
283 | void SetLocalName(string name) { | |
|
284 | m_localNameStack.Push(m_localName); | |
|
285 | m_localName.localName = name; | |
|
286 | m_localName.isArray = false; | |
|
287 | } | |
|
288 | ||
|
289 | void SetLocalName(string name, bool isArray) { | |
|
290 | m_localNameStack.Push(m_localName); | |
|
291 | m_localName.localName = name; | |
|
292 | m_localName.isArray = isArray; | |
|
293 | } | |
|
294 | ||
|
295 | void RestoreLocalName() { | |
|
296 | m_localName = m_localNameStack.Pop(); | |
|
297 | } | |
|
298 | ||
|
299 | public override void Close() { | |
|
300 | ||
|
301 | } | |
|
302 | ||
|
303 | protected override void Dispose(bool disposing) { | |
|
304 | #if MONO | |
|
305 | disposing = true; | |
|
306 | #endif | |
|
307 | if (disposing) { | |
|
308 | m_parser.Dispose(); | |
|
309 | } | |
|
310 | base.Dispose(disposing); | |
|
311 | } | |
|
312 | ||
|
313 | public static JSONXmlReader Create(string file, JSONXmlReaderOptions options) { | |
|
314 | return Create(File.OpenText(file), options); | |
|
315 | } | |
|
316 | ||
|
317 | /// <summary> | |
|
318 | /// Creates the XmlReader for the specified text stream with JSON data. | |
|
319 | /// </summary> | |
|
320 | /// <param name="reader">Text reader.</param> | |
|
321 | /// <param name="options">Options.</param> | |
|
322 | /// <remarks> | |
|
323 | /// The reader will be disposed when the XmlReader is disposed. | |
|
324 | /// </remarks> | |
|
325 | public static JSONXmlReader Create(TextReader reader, JSONXmlReaderOptions options) { | |
|
326 | return new JSONXmlReader(new JSONParser(reader, true), options); | |
|
327 | } | |
|
328 | ||
|
329 | /// <summary> | |
|
330 | /// Creates the XmlReader for the specified stream with JSON data. | |
|
331 | /// </summary> | |
|
332 | /// <param name="stream">Stream.</param> | |
|
333 | /// <param name="options">Options.</param> | |
|
334 | /// <remarks> | |
|
335 | /// The stream will be disposed when the XmlReader is disposed. | |
|
336 | /// </remarks> | |
|
337 | public static JSONXmlReader Create(Stream stream, JSONXmlReaderOptions options) { | |
|
338 | Safe.ArgumentNotNull(stream, "stream"); | |
|
339 | // HACK don't dispose StreaReader to keep stream opened | |
|
340 | return Create(new StreamReader(stream), options); | |
|
341 | } | |
|
342 | } | |
|
343 | } |
@@ -1,65 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Xml; | |
|
6 | ||
|
7 | namespace Implab.JSON { | |
|
8 | /// <summary> | |
|
9 | /// Набор необязательных параметров для <see cref="JSONXmlReader"/>, позволяющий управлять процессом | |
|
10 | /// интерпретации <c>JSON</c> документа. | |
|
11 | /// </summary> | |
|
12 | public class JSONXmlReaderOptions { | |
|
13 | /// <summary> | |
|
14 | /// Пространство имен в котором будут располагаться читаемые элементы документа | |
|
15 | /// </summary> | |
|
16 | public string NamespaceURI { | |
|
17 | get; | |
|
18 | set; | |
|
19 | } | |
|
20 | ||
|
21 | /// <summary> | |
|
22 | /// Интерпретировать массивы как множественные элементы (убирает один уровень вложенности), иначе массив | |
|
23 | /// представляется в виде узла, дочерними элементами которого являются элементы массива, имена дочерних элементов | |
|
24 | /// определяются свойством <see cref="ArrayItemName"/>. По умолчанию <c>false</c>. | |
|
25 | /// </summary> | |
|
26 | public bool FlattenArrays { | |
|
27 | get; | |
|
28 | set; | |
|
29 | } | |
|
30 | ||
|
31 | /// <summary> | |
|
32 | /// Префикс, для узлов документа | |
|
33 | /// </summary> | |
|
34 | public string NodesPrefix { | |
|
35 | get; | |
|
36 | set; | |
|
37 | } | |
|
38 | ||
|
39 | /// <summary> | |
|
40 | /// Имя корневого элемента в xml документе | |
|
41 | /// </summary> | |
|
42 | public string RootName { | |
|
43 | get; | |
|
44 | set; | |
|
45 | } | |
|
46 | ||
|
47 | /// <summary> | |
|
48 | /// Имя элемента для массивов, если не включена опция <see cref="FlattenArrays"/>. | |
|
49 | /// По умолчанию <c>item</c>. | |
|
50 | /// </summary> | |
|
51 | public string ArrayItemName { | |
|
52 | get; | |
|
53 | set; | |
|
54 | } | |
|
55 | ||
|
56 | /// <summary> | |
|
57 | /// Таблица атомизированных строк для построения документа. | |
|
58 | /// </summary> | |
|
59 | public XmlNameTable NameTable { | |
|
60 | get; | |
|
61 | set; | |
|
62 | } | |
|
63 | ||
|
64 | } | |
|
65 | } |
@@ -1,50 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Threading.Tasks; | |
|
6 | ||
|
7 | namespace Implab.JSON { | |
|
8 | /// <summary> | |
|
9 | /// Тип токенов, возвращаемых <see cref="JSONScanner"/>. | |
|
10 | /// </summary> | |
|
11 | public enum JsonTokenType : int { | |
|
12 | None = 0, | |
|
13 | /// <summary> | |
|
14 | /// Начало объекта | |
|
15 | /// </summary> | |
|
16 | BeginObject, | |
|
17 | /// <summary> | |
|
18 | /// Конец объекта | |
|
19 | /// </summary> | |
|
20 | EndObject, | |
|
21 | /// <summary> | |
|
22 | /// Начало массива | |
|
23 | /// </summary> | |
|
24 | BeginArray, | |
|
25 | /// <summary> | |
|
26 | /// Конец массива | |
|
27 | /// </summary> | |
|
28 | EndArray, | |
|
29 | /// <summary> | |
|
30 | /// Строка | |
|
31 | /// </summary> | |
|
32 | String, | |
|
33 | /// <summary> | |
|
34 | /// Число | |
|
35 | /// </summary> | |
|
36 | Number, | |
|
37 | /// <summary> | |
|
38 | /// Литерал | |
|
39 | /// </summary> | |
|
40 | Literal, | |
|
41 | /// <summary> | |
|
42 | /// Разделитель имени <c>:</c> | |
|
43 | /// </summary> | |
|
44 | NameSeparator, | |
|
45 | /// <summary> | |
|
46 | /// Разделитель имени <c>,</c> | |
|
47 | /// </summary> | |
|
48 | ValueSeparator | |
|
49 | } | |
|
50 | } |
@@ -1,96 +0,0 | |||
|
1 | using Implab; | |
|
2 | using Implab.Parsing; | |
|
3 | using System; | |
|
4 | using System.Collections.Generic; | |
|
5 | using System.Diagnostics; | |
|
6 | using System.Linq; | |
|
7 | using System.Text; | |
|
8 | using System.Threading.Tasks; | |
|
9 | ||
|
10 | namespace Implab.JSON { | |
|
11 | /// <summary> | |
|
12 | /// Класс для преобразования экранированной строки JSON | |
|
13 | /// </summary> | |
|
14 | public class StringTranslator : Scanner { | |
|
15 | static readonly char[] _escMap; | |
|
16 | static readonly int[] _hexMap; | |
|
17 | ||
|
18 | static StringTranslator() { | |
|
19 | var chars = new char[] { 'b', 'f', 't', 'r', 'n', '\\', '/' }; | |
|
20 | var vals = new char[] { '\b', '\f', '\t', '\r', '\n', '\\', '/' }; | |
|
21 | ||
|
22 | _escMap = new char[chars.Max() + 1]; | |
|
23 | ||
|
24 | for (int i = 0; i < chars.Length; i++) | |
|
25 | _escMap[chars[i]] = vals[i]; | |
|
26 | ||
|
27 | var hexs = new char[] { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F' }; | |
|
28 | var ints = new int[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 10, 11, 12, 13, 14, 15 }; | |
|
29 | ||
|
30 | _hexMap = new int[hexs.Max() + 1]; | |
|
31 | ||
|
32 | for (int i = 0; i < hexs.Length; i++) | |
|
33 | _hexMap[hexs[i]] = ints[i]; | |
|
34 | ||
|
35 | } | |
|
36 | ||
|
37 | public StringTranslator() | |
|
38 | : base(JSONGrammar.Instance.JsonStringDFA.States, JSONGrammar.Instance.JsonStringDFA.Alphabet.GetTranslationMap()) { | |
|
39 | } | |
|
40 | ||
|
41 | public string Translate(string data) { | |
|
42 | Safe.ArgumentNotNull(data, "data"); | |
|
43 | return Translate(data.ToCharArray()); | |
|
44 | } | |
|
45 | ||
|
46 | public string Translate(char[] data) { | |
|
47 | Safe.ArgumentNotNull(data, "data"); | |
|
48 | return Translate(data, data.Length); | |
|
49 | } | |
|
50 | ||
|
51 | public string Translate(char[] data, int length) { | |
|
52 | Safe.ArgumentNotNull(data, "data"); | |
|
53 | Safe.ArgumentInRange(length, 0, data.Length, "length"); | |
|
54 | ||
|
55 | var translated = new char[length]; | |
|
56 | ||
|
57 | Feed(data,length); | |
|
58 | ||
|
59 | int pos = 0; | |
|
60 | ||
|
61 | while (ReadTokenInternal()) { | |
|
62 | switch ((JSONGrammar.TokenType)TokenTags[0]) { | |
|
63 | case JSONGrammar.TokenType.UnescapedChar: | |
|
64 | Array.Copy(m_buffer,m_tokenOffset,translated,pos,m_tokenLen); | |
|
65 | pos += m_tokenLen; | |
|
66 | break; | |
|
67 | case JSONGrammar.TokenType.EscapedChar: | |
|
68 | translated[pos] = _escMap[m_buffer[m_tokenOffset + 1]]; | |
|
69 | pos++; | |
|
70 | break; | |
|
71 | case JSONGrammar.TokenType.EscapedUnicode: | |
|
72 | translated[pos] = TranslateHexUnicode(m_buffer,m_tokenOffset + 2); | |
|
73 | pos++; | |
|
74 | break; | |
|
75 | } | |
|
76 | } | |
|
77 | ||
|
78 | return new String(translated, 0, pos); | |
|
79 | } | |
|
80 | ||
|
81 | internal static char TranslateEscapedChar(char symbol) { | |
|
82 | return _escMap[symbol]; | |
|
83 | } | |
|
84 | ||
|
85 | internal static char TranslateHexUnicode(char[] symbols, int offset) { | |
|
86 | Debug.Assert(symbols != null); | |
|
87 | Debug.Assert(symbols.Length - offset >= 4); | |
|
88 | ||
|
89 | int value = (_hexMap[symbols[offset]] << 12) | |
|
90 | | (_hexMap[symbols[offset + 1]] << 8) | |
|
91 | | (_hexMap[symbols[offset + 2]] << 4) | |
|
92 | | (_hexMap[symbols[offset + 3]]); | |
|
93 | return (char)value; | |
|
94 | } | |
|
95 | } | |
|
96 | } |
@@ -1,17 +0,0 | |||
|
1 | using System; | |
|
2 | ||
|
3 | namespace Implab.Parsing { | |
|
4 | public class AltToken: BinaryToken { | |
|
5 | public AltToken(Token left, Token right) | |
|
6 | : base(left, right) { | |
|
7 | } | |
|
8 | ||
|
9 | public override void Accept(IVisitor visitor) { | |
|
10 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
11 | visitor.Visit(this); | |
|
12 | } | |
|
13 | public override string ToString() { | |
|
14 | return String.Format(Right is BinaryToken ? "{0}|({1})" : "{0}|{1}", Left, Right); | |
|
15 | } | |
|
16 | } | |
|
17 | } |
@@ -1,26 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using System.Text; | |
|
6 | using System.Threading.Tasks; | |
|
7 | ||
|
8 | namespace Implab.Parsing { | |
|
9 | public abstract class BinaryToken : Token { | |
|
10 | Token m_left; | |
|
11 | Token m_right; | |
|
12 | ||
|
13 | public Token Left { | |
|
14 | get { return m_left; } | |
|
15 | } | |
|
16 | ||
|
17 | public Token Right { | |
|
18 | get { return m_right; } | |
|
19 | } | |
|
20 | ||
|
21 | protected BinaryToken(Token left, Token right) { | |
|
22 | Safe.ArgumentNotNull(m_left = left, "left"); | |
|
23 | Safe.ArgumentNotNull(m_right = right, "right"); | |
|
24 | } | |
|
25 | } | |
|
26 | } |
@@ -1,22 +0,0 | |||
|
1 | namespace Implab.Parsing { | |
|
2 | public class CDFADefinition : DFADefinition { | |
|
3 | readonly CharAlphabet m_alphabet; | |
|
4 | ||
|
5 | public CharAlphabet Alphabet { | |
|
6 | get { return m_alphabet; } | |
|
7 | } | |
|
8 | ||
|
9 | public CDFADefinition(CharAlphabet alphabet): base(alphabet.Count) { | |
|
10 | m_alphabet = alphabet; | |
|
11 | } | |
|
12 | ||
|
13 | public CDFADefinition Optimize() { | |
|
14 | ||
|
15 | return (CDFADefinition)Optimize(alphabet => new CDFADefinition((CharAlphabet)alphabet), m_alphabet, new CharAlphabet()); | |
|
16 | } | |
|
17 | ||
|
18 | public void PrintDFA() { | |
|
19 | PrintDFA(m_alphabet); | |
|
20 | } | |
|
21 | } | |
|
22 | } |
@@ -1,22 +0,0 | |||
|
1 | using System; | |
|
2 | ||
|
3 | namespace Implab.Parsing { | |
|
4 | public class CatToken : BinaryToken { | |
|
5 | public CatToken(Token left, Token right) | |
|
6 | : base(left, right) { | |
|
7 | } | |
|
8 | ||
|
9 | public override void Accept(IVisitor visitor) { | |
|
10 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
11 | visitor.Visit(this); | |
|
12 | } | |
|
13 | ||
|
14 | public override string ToString() { | |
|
15 | return String.Format("{0}{1}", FormatToken(Left), FormatToken(Right)); | |
|
16 | } | |
|
17 | ||
|
18 | string FormatToken(Token token) { | |
|
19 | return String.Format(token is AltToken ? "({0})" : "{0}", token); | |
|
20 | } | |
|
21 | } | |
|
22 | } |
@@ -1,23 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using System.Text; | |
|
6 | using System.Threading.Tasks; | |
|
7 | ||
|
8 | namespace Implab.Parsing { | |
|
9 | public class CharAlphabet: IndexedAlphabetBase<char> { | |
|
10 | ||
|
11 | public CharAlphabet() | |
|
12 | : base(char.MaxValue + 1) { | |
|
13 | } | |
|
14 | ||
|
15 | public override int GetSymbolIndex(char symbol) { | |
|
16 | return symbol; | |
|
17 | } | |
|
18 | ||
|
19 | public override IEnumerable<char> InputSymbols { | |
|
20 | get { return Enumerable.Range(char.MinValue, char.MaxValue).Select(x => (char)x); } | |
|
21 | } | |
|
22 | } | |
|
23 | } |
@@ -1,180 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Diagnostics; | |
|
5 | using System.Linq; | |
|
6 | ||
|
7 | namespace Implab.Parsing { | |
|
8 | /// <summary> | |
|
9 | /// Используется для построения ДКА по регулярному выражению, сначала обходит | |
|
10 | /// регулярное выражение и вычисляет followpos, затем используется метод | |
|
11 | /// <see cref="BuildDFA(IDFADefinition)"/> для построения автомата. | |
|
12 | /// </summary> | |
|
13 | public class DFABuilder : IVisitor { | |
|
14 | int m_idx = 0; | |
|
15 | Token m_root; | |
|
16 | HashSet<int> m_firstpos; | |
|
17 | HashSet<int> m_lastpos; | |
|
18 | ||
|
19 | Dictionary<int, HashSet<int>> m_followpos = new Dictionary<int, HashSet<int>>(); | |
|
20 | Dictionary<int, int> m_indexes = new Dictionary<int, int>(); | |
|
21 | Dictionary<int, int> m_ends = new Dictionary<int, int>(); | |
|
22 | ||
|
23 | public Dictionary<int, HashSet<int>> FollowposMap { | |
|
24 | get { return m_followpos; } | |
|
25 | } | |
|
26 | ||
|
27 | public HashSet<int> Followpos(int pos) { | |
|
28 | HashSet<int> set; | |
|
29 | if (m_followpos.TryGetValue(pos, out set)) | |
|
30 | return set; | |
|
31 | return m_followpos[pos] = new HashSet<int>(); | |
|
32 | } | |
|
33 | ||
|
34 | bool Nullable(object n) { | |
|
35 | if (n is EmptyToken || n is StarToken) | |
|
36 | return true; | |
|
37 | if (n is AltToken) | |
|
38 | return Nullable(((AltToken)n).Left) || Nullable(((AltToken)n).Right); | |
|
39 | if (n is CatToken) | |
|
40 | return Nullable(((CatToken)n).Left) && Nullable(((CatToken)n).Right); | |
|
41 | return false; | |
|
42 | } | |
|
43 | ||
|
44 | ||
|
45 | public void Visit(AltToken token) { | |
|
46 | if (m_root == null) | |
|
47 | m_root = token; | |
|
48 | var firtspos = new HashSet<int>(); | |
|
49 | var lastpos = new HashSet<int>(); | |
|
50 | ||
|
51 | token.Left.Accept(this); | |
|
52 | firtspos.UnionWith(m_firstpos); | |
|
53 | lastpos.UnionWith(m_lastpos); | |
|
54 | ||
|
55 | token.Right.Accept(this); | |
|
56 | firtspos.UnionWith(m_firstpos); | |
|
57 | lastpos.UnionWith(m_lastpos); | |
|
58 | ||
|
59 | m_firstpos = firtspos; | |
|
60 | m_lastpos = lastpos; | |
|
61 | } | |
|
62 | ||
|
63 | public void Visit(StarToken token) { | |
|
64 | if (m_root == null) | |
|
65 | m_root = token; | |
|
66 | token.Token.Accept(this); | |
|
67 | ||
|
68 | foreach (var i in m_lastpos) | |
|
69 | Followpos(i).UnionWith(m_firstpos); | |
|
70 | } | |
|
71 | ||
|
72 | public void Visit(CatToken token) { | |
|
73 | if (m_root == null) | |
|
74 | m_root = token; | |
|
75 | ||
|
76 | var firtspos = new HashSet<int>(); | |
|
77 | var lastpos = new HashSet<int>(); | |
|
78 | token.Left.Accept(this); | |
|
79 | firtspos.UnionWith(m_firstpos); | |
|
80 | var leftLastpos = m_lastpos; | |
|
81 | ||
|
82 | token.Right.Accept(this); | |
|
83 | lastpos.UnionWith(m_lastpos); | |
|
84 | var rightFirstpos = m_firstpos; | |
|
85 | ||
|
86 | if (Nullable(token.Left)) | |
|
87 | firtspos.UnionWith(rightFirstpos); | |
|
88 | ||
|
89 | if (Nullable(token.Right)) | |
|
90 | lastpos.UnionWith(leftLastpos); | |
|
91 | ||
|
92 | m_firstpos = firtspos; | |
|
93 | m_lastpos = lastpos; | |
|
94 | ||
|
95 | foreach (var i in leftLastpos) | |
|
96 | Followpos(i).UnionWith(rightFirstpos); | |
|
97 | ||
|
98 | } | |
|
99 | ||
|
100 | public void Visit(EmptyToken token) { | |
|
101 | if (m_root == null) | |
|
102 | m_root = token; | |
|
103 | ; | |
|
104 | } | |
|
105 | ||
|
106 | public void Visit(SymbolToken token) { | |
|
107 | if (m_root == null) | |
|
108 | m_root = token; | |
|
109 | m_idx++; | |
|
110 | m_indexes[m_idx] = token.Value; | |
|
111 | m_firstpos = new HashSet<int>(new[] { m_idx }); | |
|
112 | m_lastpos = new HashSet<int>(new[] { m_idx }); | |
|
113 | } | |
|
114 | ||
|
115 | public void Visit(EndToken token) { | |
|
116 | if (m_root == null) | |
|
117 | m_root = token; | |
|
118 | m_idx++; | |
|
119 | m_indexes[m_idx] = IndexedAlphabetBase<char>.UNCLASSIFIED; | |
|
120 | m_firstpos = new HashSet<int>(new[] { m_idx }); | |
|
121 | m_lastpos = new HashSet<int>(new[] { m_idx }); | |
|
122 | Followpos(m_idx); | |
|
123 | m_ends.Add(m_idx, token.Tag); | |
|
124 | } | |
|
125 | ||
|
126 | public void BuildDFA(IDFADefinition dfa) { | |
|
127 | Safe.ArgumentNotNull(dfa,"dfa"); | |
|
128 | ||
|
129 | var stateMap = new Dictionary<HashSet<int>, int>(new CustomEqualityComparer<HashSet<int>>( | |
|
130 | (x, y) => x.SetEquals(y), | |
|
131 | (x) => x.Sum(n => n.GetHashCode()) | |
|
132 | )); | |
|
133 | ||
|
134 | stateMap[m_firstpos] = DefineState( dfa, m_firstpos); | |
|
135 | Debug.Assert(stateMap[m_firstpos] == DFADefinition.INITIAL_STATE); | |
|
136 | ||
|
137 | var queue = new Queue<HashSet<int>>(); | |
|
138 | ||
|
139 | queue.Enqueue(m_firstpos); | |
|
140 | ||
|
141 | while (queue.Count > 0) { | |
|
142 | var state = queue.Dequeue(); | |
|
143 | var s1 = stateMap[state]; | |
|
144 | ||
|
145 | for (int a = 0; a < dfa.AlphabetSize; a++) { | |
|
146 | var next = new HashSet<int>(); | |
|
147 | foreach (var p in state) { | |
|
148 | if (m_indexes[p] == a) { | |
|
149 | next.UnionWith(Followpos(p)); | |
|
150 | } | |
|
151 | } | |
|
152 | if (next.Count > 0) { | |
|
153 | int s2; | |
|
154 | if (!stateMap.TryGetValue(next, out s2)) { | |
|
155 | stateMap[next] = s2 = DefineState(dfa, next); | |
|
156 | queue.Enqueue(next); | |
|
157 | } | |
|
158 | dfa.DefineTransition(s1, s2, a); | |
|
159 | } | |
|
160 | } | |
|
161 | ||
|
162 | } | |
|
163 | } | |
|
164 | ||
|
165 | int[] GetStateTags(HashSet<int> state) { | |
|
166 | Debug.Assert(state != null); | |
|
167 | return state.Where(m_ends.ContainsKey).Select(pos => m_ends[pos]).ToArray(); | |
|
168 | } | |
|
169 | ||
|
170 | int DefineState(IDFADefinition automa, HashSet<int> state) { | |
|
171 | Debug.Assert(automa != null); | |
|
172 | Debug.Assert(state != null); | |
|
173 | ||
|
174 | var tags = GetStateTags(state); | |
|
175 | ||
|
176 | return tags.Length > 0 ? automa.AddState(tags) : automa.AddState(); | |
|
177 | } | |
|
178 | ||
|
179 | } | |
|
180 | } |
@@ -1,285 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Diagnostics; | |
|
5 | using System.Linq; | |
|
6 | ||
|
7 | namespace Implab.Parsing { | |
|
8 | public class DFADefinition<TInput, TState, TTag> : IDFADefinition<TInput, TState, TTag> { | |
|
9 | readonly List<DFAStateDescriptior<TTag>> m_states; | |
|
10 | ||
|
11 | public const int INITIAL_STATE = 1; | |
|
12 | public const int UNREACHEBLE_STATE = 0; | |
|
13 | ||
|
14 | DFAStateDescriptior<TTag>[] m_statesArray; | |
|
15 | readonly int m_alpabetSize; | |
|
16 | ||
|
17 | public DFADefinition(int alphabetSize) { | |
|
18 | m_states = new List<DFAStateDescriptior<TTag>>(); | |
|
19 | m_alpabetSize = alphabetSize; | |
|
20 | ||
|
21 | m_states.Add(new DFAStateDescriptior<TTag>()); | |
|
22 | } | |
|
23 | ||
|
24 | public bool InitialStateIsFinal { | |
|
25 | get { | |
|
26 | return m_states[INITIAL_STATE].final; | |
|
27 | } | |
|
28 | } | |
|
29 | ||
|
30 | public int AddState() { | |
|
31 | var index = m_states.Count; | |
|
32 | m_states.Add(new DFAStateDescriptior<TTag> { | |
|
33 | final = false, | |
|
34 | transitions = new int[AlphabetSize] | |
|
35 | }); | |
|
36 | m_statesArray = null; | |
|
37 | ||
|
38 | return index; | |
|
39 | } | |
|
40 | ||
|
41 | public int AddState(TTag[] tag) { | |
|
42 | var index = m_states.Count; | |
|
43 | bool final = tag != null && tag.Length != 0; | |
|
44 | m_states.Add(new DFAStateDescriptior<TTag> { | |
|
45 | final = final, | |
|
46 | transitions = new int[AlphabetSize], | |
|
47 | tag = final ? tag : null | |
|
48 | }); | |
|
49 | m_statesArray = null; | |
|
50 | return index; | |
|
51 | } | |
|
52 | ||
|
53 | public void DefineTransition(TState s1, TState s2, TInput symbol) { | |
|
54 | int is1 = StateAlphabet.Translate(s1); | |
|
55 | int is2 = StateAlphabet.Translate(s2); | |
|
56 | int isym = InputAlphabet.Translate(symbol); | |
|
57 | ||
|
58 | Safe.ArgumentAssert(is1 != 0, "s1"); | |
|
59 | Safe.ArgumentAssert(is2 != 0, "s2"); | |
|
60 | Safe.ArgumentAssert(isym != 0, "symbol"); | |
|
61 | ||
|
62 | m_states[is1].transitions[isym] = is2; | |
|
63 | } | |
|
64 | ||
|
65 | #region IDFADefinition implementation | |
|
66 | ||
|
67 | public DFAStateDescriptior<TTag>[] GetTransitionTable() { | |
|
68 | if (m_statesArray == null) | |
|
69 | m_statesArray = m_states.ToArray(); | |
|
70 | return m_statesArray; | |
|
71 | } | |
|
72 | ||
|
73 | public IAlphabet<TInput> InputAlphabet { | |
|
74 | get { | |
|
75 | throw new NotImplementedException(); | |
|
76 | } | |
|
77 | } | |
|
78 | ||
|
79 | public IAlphabet<TState> StateAlphabet { | |
|
80 | get { | |
|
81 | throw new NotImplementedException(); | |
|
82 | } | |
|
83 | } | |
|
84 | ||
|
85 | #endregion | |
|
86 | ||
|
87 | protected IDFADefinition<> Optimize<TA>(Func<IAlphabet<TA>, IDFADefinition> dfaFactory,IAlphabet<TA> sourceAlphabet, IAlphabet<TA> minimalAlphabet) { | |
|
88 | Safe.ArgumentNotNull(dfaFactory, "dfaFactory"); | |
|
89 | Safe.ArgumentNotNull(minimalAlphabet, "minimalAlphabet"); | |
|
90 | ||
|
91 | var setComparer = new CustomEqualityComparer<HashSet<int>>( | |
|
92 | (x, y) => x.SetEquals(y), | |
|
93 | (s) => s.Sum(x => x.GetHashCode()) | |
|
94 | ); | |
|
95 | ||
|
96 | var arrayComparer = new CustomEqualityComparer<int[]>( | |
|
97 | (x,y) => (new HashSet<int>(x)).SetEquals(new HashSet<int>(y)), | |
|
98 | (a) => a.Sum(x => x.GetHashCode()) | |
|
99 | ); | |
|
100 | ||
|
101 | var optimalStates = new HashSet<HashSet<int>>(setComparer); | |
|
102 | var queue = new HashSet<HashSet<int>>(setComparer); | |
|
103 | ||
|
104 | foreach (var g in Enumerable | |
|
105 | .Range(INITIAL_STATE, m_states.Count-1) | |
|
106 | .Select(i => new { | |
|
107 | index = i, | |
|
108 | descriptor = m_states[i] | |
|
109 | }) | |
|
110 | .Where(x => x.descriptor.final) | |
|
111 | .GroupBy(x => x.descriptor.tag, arrayComparer) | |
|
112 | ) { | |
|
113 | optimalStates.Add(new HashSet<int>(g.Select(x => x.index))); | |
|
114 | } | |
|
115 | ||
|
116 | var state = new HashSet<int>( | |
|
117 | Enumerable | |
|
118 | .Range(INITIAL_STATE, m_states.Count - 1) | |
|
119 | .Where(i => !m_states[i].final) | |
|
120 | ); | |
|
121 | optimalStates.Add(state); | |
|
122 | queue.Add(state); | |
|
123 | ||
|
124 | while (queue.Count > 0) { | |
|
125 | var stateA = queue.First(); | |
|
126 | queue.Remove(stateA); | |
|
127 | ||
|
128 | for (int c = 0; c < AlphabetSize; c++) { | |
|
129 | var stateX = new HashSet<int>(); | |
|
130 | ||
|
131 | for(int s = 1; s < m_states.Count; s++) { | |
|
132 | if (stateA.Contains(m_states[s].transitions[c])) | |
|
133 | stateX.Add(s); | |
|
134 | } | |
|
135 | ||
|
136 | foreach (var stateY in optimalStates.ToArray()) { | |
|
137 | if (stateX.Overlaps(stateY) && !stateY.IsSubsetOf(stateX)) { | |
|
138 | var stateR1 = new HashSet<int>(stateY); | |
|
139 | var stateR2 = new HashSet<int>(stateY); | |
|
140 | ||
|
141 | stateR1.IntersectWith(stateX); | |
|
142 | stateR2.ExceptWith(stateX); | |
|
143 | ||
|
144 | optimalStates.Remove(stateY); | |
|
145 | optimalStates.Add(stateR1); | |
|
146 | optimalStates.Add(stateR2); | |
|
147 | ||
|
148 | if (queue.Contains(stateY)) { | |
|
149 | queue.Remove(stateY); | |
|
150 | queue.Add(stateR1); | |
|
151 | queue.Add(stateR2); | |
|
152 | } else { | |
|
153 | queue.Add(stateR1.Count <= stateR2.Count ? stateR1 : stateR2); | |
|
154 | } | |
|
155 | } | |
|
156 | } | |
|
157 | } | |
|
158 | } | |
|
159 | ||
|
160 | // строим карты соотвествия оптимальных состояний с оригинальными | |
|
161 | ||
|
162 | var initialState = optimalStates.Single(x => x.Contains(INITIAL_STATE)); | |
|
163 | ||
|
164 | // карта получения оптимального состояния по соотвествующему ему простому состоянию | |
|
165 | int[] reveseOptimalMap = new int[m_states.Count]; | |
|
166 | // карта с индексами оптимальных состояний | |
|
167 | HashSet<int>[] optimalMap = new HashSet<int>[optimalStates.Count + 1]; | |
|
168 | { | |
|
169 | optimalMap[0] = new HashSet<int>(); // unreachable state | |
|
170 | optimalMap[1] = initialState; // initial state | |
|
171 | foreach (var ss in initialState) | |
|
172 | reveseOptimalMap[ss] = 1; | |
|
173 | ||
|
174 | int i = 2; | |
|
175 | foreach (var s in optimalStates) { | |
|
176 | if (s.SetEquals(initialState)) | |
|
177 | continue; | |
|
178 | optimalMap[i] = s; | |
|
179 | foreach (var ss in s) | |
|
180 | reveseOptimalMap[ss] = i; | |
|
181 | i++; | |
|
182 | } | |
|
183 | } | |
|
184 | ||
|
185 | // получаем минимальный алфавит | |
|
186 | ||
|
187 | var minClasses = new HashSet<HashSet<int>>(setComparer); | |
|
188 | var alphaQueue = new Queue<HashSet<int>>(); | |
|
189 | alphaQueue.Enqueue(new HashSet<int>(Enumerable.Range(0,AlphabetSize))); | |
|
190 | ||
|
191 | for (int s = 1 ; s < optimalMap.Length; s++) { | |
|
192 | var newQueue = new Queue<HashSet<int>>(); | |
|
193 | ||
|
194 | foreach (var A in alphaQueue) { | |
|
195 | if (A.Count == 1) { | |
|
196 | minClasses.Add(A); | |
|
197 | continue; | |
|
198 | } | |
|
199 | ||
|
200 | // различаем классы символов, которые переводят в различные оптимальные состояния | |
|
201 | // optimalState -> alphaClass | |
|
202 | var classes = new Dictionary<int, HashSet<int>>(); | |
|
203 | ||
|
204 | foreach (var term in A) { | |
|
205 | // ищем все переходы класса по символу term | |
|
206 | var s2 = reveseOptimalMap[ | |
|
207 | optimalMap[s].Select(x => m_states[x].transitions[term]).FirstOrDefault(x => x != 0) // первое допустимое элементарное состояние, если есть | |
|
208 | ]; | |
|
209 | ||
|
210 | HashSet<int> A2; | |
|
211 | if (!classes.TryGetValue(s2, out A2)) { | |
|
212 | A2 = new HashSet<int>(); | |
|
213 | newQueue.Enqueue(A2); | |
|
214 | classes[s2] = A2; | |
|
215 | } | |
|
216 | A2.Add(term); | |
|
217 | } | |
|
218 | } | |
|
219 | ||
|
220 | if (newQueue.Count == 0) | |
|
221 | break; | |
|
222 | alphaQueue = newQueue; | |
|
223 | } | |
|
224 | ||
|
225 | foreach (var A in alphaQueue) | |
|
226 | minClasses.Add(A); | |
|
227 | ||
|
228 | var alphabetMap = sourceAlphabet.Reclassify(minimalAlphabet, minClasses); | |
|
229 | ||
|
230 | // построение автомата | |
|
231 | ||
|
232 | var minimalDFA = dfaFactory(minimalAlphabet); | |
|
233 | ||
|
234 | var states = new int[ optimalMap.Length ]; | |
|
235 | states[0] = UNREACHEBLE_STATE; | |
|
236 | ||
|
237 | for(var s = INITIAL_STATE; s < states.Length; s++) { | |
|
238 | var tags = optimalMap[s].SelectMany(x => m_states[x].tag ?? Enumerable.Empty<int>()).Distinct().ToArray(); | |
|
239 | if (tags.Length > 0) | |
|
240 | states[s] = minimalDFA.AddState(tags); | |
|
241 | else | |
|
242 | states[s] = minimalDFA.AddState(); | |
|
243 | } | |
|
244 | ||
|
245 | Debug.Assert(states[INITIAL_STATE] == INITIAL_STATE); | |
|
246 | ||
|
247 | for (int s1 = 1; s1 < m_states.Count; s1++) { | |
|
248 | for (int c = 0; c < AlphabetSize; c++) { | |
|
249 | var s2 = m_states[s1].transitions[c]; | |
|
250 | if (s2 != UNREACHEBLE_STATE) { | |
|
251 | minimalDFA.DefineTransition( | |
|
252 | reveseOptimalMap[s1], | |
|
253 | reveseOptimalMap[s2], | |
|
254 | alphabetMap[c] | |
|
255 | ); | |
|
256 | } | |
|
257 | } | |
|
258 | } | |
|
259 | ||
|
260 | return minimalDFA; | |
|
261 | } | |
|
262 | ||
|
263 | public void PrintDFA<TA>(IAlphabet<TA> alphabet) { | |
|
264 | ||
|
265 | var reverseMap = alphabet.CreateReverseMap(); | |
|
266 | ||
|
267 | for (int i = 1; i < reverseMap.Length; i++) { | |
|
268 | Console.WriteLine("C{0}: {1}", i, String.Join(",", reverseMap[i])); | |
|
269 | } | |
|
270 | ||
|
271 | for (int i = 1; i < m_states.Count; i++) { | |
|
272 | var s = m_states[i]; | |
|
273 | for (int c = 0; c < AlphabetSize; c++) | |
|
274 | if (s.transitions[c] != UNREACHEBLE_STATE) | |
|
275 | Console.WriteLine("S{0} -{1}-> S{2}{3}", i, String.Join(",", reverseMap[c]), s.transitions[c], m_states[s.transitions[c]].final ? "$" : ""); | |
|
276 | } | |
|
277 | } | |
|
278 | ||
|
279 | public int AlphabetSize { | |
|
280 | get { | |
|
281 | return m_alpabetSize; | |
|
282 | } | |
|
283 | } | |
|
284 | } | |
|
285 | } |
@@ -1,13 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Threading.Tasks; | |
|
6 | ||
|
7 | namespace Implab.Parsing { | |
|
8 | public struct DFAStateDescriptior<TTag> { | |
|
9 | public bool final; | |
|
10 | public TTag[] tag; | |
|
11 | public int[] transitions; | |
|
12 | } | |
|
13 | } |
@@ -1,61 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Diagnostics; | |
|
5 | using System.Linq; | |
|
6 | using System.Text; | |
|
7 | using System.Threading.Tasks; | |
|
8 | ||
|
9 | namespace Implab.Parsing { | |
|
10 | public abstract class DFAutomaton<T> { | |
|
11 | protected struct ContextFrame { | |
|
12 | public DFAStateDescriptior[] states; | |
|
13 | public int current; | |
|
14 | public T info; | |
|
15 | } | |
|
16 | ||
|
17 | public const int INITIAL_STATE = DFADefinition.INITIAL_STATE; | |
|
18 | public const int UNREACHEBLE_STATE = DFADefinition.UNREACHEBLE_STATE; | |
|
19 | ||
|
20 | protected ContextFrame m_context; | |
|
21 | Stack<ContextFrame> m_contextStack = new Stack<ContextFrame>(); | |
|
22 | ||
|
23 | protected int Level { | |
|
24 | get { return m_contextStack.Count; } | |
|
25 | } | |
|
26 | ||
|
27 | protected DFAutomaton(DFAStateDescriptior[] states, int startState, T info) { | |
|
28 | Safe.ArgumentNotNull(states, "states"); | |
|
29 | Safe.ArgumentInRange(startState, 0, states.Length - 1, "startState"); | |
|
30 | ||
|
31 | m_context.states = states; | |
|
32 | m_context.current = startState; | |
|
33 | m_context.info = info; | |
|
34 | } | |
|
35 | ||
|
36 | protected void Switch(DFAStateDescriptior[] states, int current, T info) { | |
|
37 | Debug.Assert(states != null); | |
|
38 | Debug.Assert(current >= 0 && current < states.Length); | |
|
39 | m_contextStack.Push(m_context); | |
|
40 | m_context.states = states; | |
|
41 | m_context.current = current; | |
|
42 | m_context.info = info; | |
|
43 | } | |
|
44 | ||
|
45 | protected void Restore() { | |
|
46 | Debug.Assert(m_contextStack.Count > 0); | |
|
47 | ||
|
48 | m_context = m_contextStack.Pop(); | |
|
49 | } | |
|
50 | ||
|
51 | protected void Move(int input) { | |
|
52 | Debug.Assert(input > 0 && input < m_context.states[m_context.current].transitions.Length); | |
|
53 | m_context.current = m_context.states[m_context.current].transitions[input]; | |
|
54 | } | |
|
55 | ||
|
56 | protected bool CanMove(int input) { | |
|
57 | Debug.Assert(input > 0 && input < m_context.states[m_context.current].transitions.Length); | |
|
58 | return m_context.states[m_context.current].transitions[input] != UNREACHEBLE_STATE; | |
|
59 | } | |
|
60 | } | |
|
61 | } |
@@ -1,29 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | ||
|
4 | namespace Implab.Parsing { | |
|
5 | public class EDFADefinition<T> : DFADefinition where T : struct, IConvertible { | |
|
6 | readonly EnumAlphabet<T> m_alphabet; | |
|
7 | ||
|
8 | public EnumAlphabet<T> Alphabet { | |
|
9 | get { return m_alphabet; } | |
|
10 | } | |
|
11 | ||
|
12 | public EDFADefinition(EnumAlphabet<T> alphabet) : base(alphabet.Count) { | |
|
13 | m_alphabet = alphabet; | |
|
14 | } | |
|
15 | ||
|
16 | public void DefineTransition(int s1, int s2, T input) { | |
|
17 | DefineTransition(s1, s2, m_alphabet.Translate(input)); | |
|
18 | } | |
|
19 | ||
|
20 | public EDFADefinition<T> Optimize() { | |
|
21 | ||
|
22 | return (EDFADefinition<T>)Optimize(alphabet => new EDFADefinition<T>((EnumAlphabet<T>)alphabet), m_alphabet, new EnumAlphabet<T>()); | |
|
23 | } | |
|
24 | ||
|
25 | public void PrintDFA() { | |
|
26 | PrintDFA(m_alphabet); | |
|
27 | } | |
|
28 | } | |
|
29 | } |
@@ -1,18 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using System.Text; | |
|
6 | using System.Threading.Tasks; | |
|
7 | ||
|
8 | namespace Implab.Parsing { | |
|
9 | public class EmptyToken : Token { | |
|
10 | public override void Accept(IVisitor visitor) { | |
|
11 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
12 | visitor.Visit(this); | |
|
13 | } | |
|
14 | public override string ToString() { | |
|
15 | return "$"; | |
|
16 | } | |
|
17 | } | |
|
18 | } |
@@ -1,37 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using System.Text; | |
|
6 | using System.Threading.Tasks; | |
|
7 | ||
|
8 | namespace Implab.Parsing { | |
|
9 | /// <summary> | |
|
10 | /// Конечный символ расширенного регулярного выражения, при построении ДКА | |
|
11 | /// используется для определения конечных состояний. | |
|
12 | /// </summary> | |
|
13 | public class EndToken: Token { | |
|
14 | ||
|
15 | int m_tag; | |
|
16 | ||
|
17 | public EndToken(int tag) { | |
|
18 | m_tag = tag; | |
|
19 | } | |
|
20 | ||
|
21 | public EndToken() | |
|
22 | : this(0) { | |
|
23 | } | |
|
24 | ||
|
25 | public int Tag { | |
|
26 | get { return m_tag; } | |
|
27 | } | |
|
28 | ||
|
29 | public override void Accept(IVisitor visitor) { | |
|
30 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
31 | visitor.Visit(this); | |
|
32 | } | |
|
33 | public override string ToString() { | |
|
34 | return "#"; | |
|
35 | } | |
|
36 | } | |
|
37 | } |
@@ -1,67 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Diagnostics; | |
|
4 | using System.Globalization; | |
|
5 | using System.Linq; | |
|
6 | using System.Diagnostics.CodeAnalysis; | |
|
7 | ||
|
8 | namespace Implab.Parsing { | |
|
9 | /// <summary> | |
|
10 | /// Алфавит символами которого являются элементы перечислений. | |
|
11 | /// </summary> | |
|
12 | /// <typeparam name="T">Тип перечислений</typeparam> | |
|
13 | public class EnumAlphabet<T> : IndexedAlphabetBase<T> where T : struct, IConvertible { | |
|
14 | [SuppressMessage("Microsoft.Design", "CA1000:DoNotDeclareStaticMembersOnGenericTypes")] | |
|
15 | static readonly T[] _symbols; | |
|
16 | static readonly EnumAlphabet<T> _fullAlphabet; | |
|
17 | ||
|
18 | [SuppressMessage("Microsoft.Design", "CA1065:DoNotRaiseExceptionsInUnexpectedLocations")] | |
|
19 | static EnumAlphabet() { | |
|
20 | if (!typeof(T).IsEnum) | |
|
21 | throw new InvalidOperationException("Invalid generic parameter, enumeration is required"); | |
|
22 | ||
|
23 | if (Enum.GetUnderlyingType(typeof(T)) != typeof(Int32)) | |
|
24 | throw new InvalidOperationException("Only enums based on Int32 are supported"); | |
|
25 | ||
|
26 | _symbols = ((T[])Enum.GetValues(typeof(T))) | |
|
27 | .OrderBy(x => x.ToInt32(CultureInfo.InvariantCulture)) | |
|
28 | .ToArray(); | |
|
29 | ||
|
30 | if ( | |
|
31 | _symbols[_symbols.Length - 1].ToInt32(CultureInfo.InvariantCulture) >= _symbols.Length | |
|
32 | || _symbols[0].ToInt32(CultureInfo.InvariantCulture) != 0 | |
|
33 | ) | |
|
34 | throw new InvalidOperationException("The specified enumeration must be zero-based and continuously numbered"); | |
|
35 | ||
|
36 | _fullAlphabet = new EnumAlphabet<T>(_symbols.Select(x => x.ToInt32(CultureInfo.InvariantCulture)).ToArray()); | |
|
37 | } | |
|
38 | ||
|
39 | ||
|
40 | ||
|
41 | public static EnumAlphabet<T> FullAlphabet { | |
|
42 | get { | |
|
43 | return _fullAlphabet; | |
|
44 | } | |
|
45 | } | |
|
46 | ||
|
47 | ||
|
48 | public EnumAlphabet() | |
|
49 | : base(_symbols.Length) { | |
|
50 | } | |
|
51 | ||
|
52 | public EnumAlphabet(int[] map) | |
|
53 | : base(map) { | |
|
54 | Debug.Assert(map.Length == _symbols.Length); | |
|
55 | } | |
|
56 | ||
|
57 | ||
|
58 | public override int GetSymbolIndex(T symbol) { | |
|
59 | return symbol.ToInt32(CultureInfo.InvariantCulture); | |
|
60 | } | |
|
61 | ||
|
62 | public override IEnumerable<T> InputSymbols { | |
|
63 | get { return _symbols; } | |
|
64 | } | |
|
65 | ||
|
66 | } | |
|
67 | } |
@@ -1,108 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using System.Text; | |
|
6 | using System.Threading.Tasks; | |
|
7 | ||
|
8 | namespace Implab.Parsing { | |
|
9 | /// <summary> | |
|
10 | /// Базовый абстрактный класс. Грамматика, позволяет формулировать выражения над алфавитом типа <c>char</c>. | |
|
11 | /// </summary> | |
|
12 | /// <typeparam name="TGrammar"></typeparam> | |
|
13 | public abstract class Grammar<TGrammar> where TGrammar: Grammar<TGrammar>, new() { | |
|
14 | static TGrammar _instance; | |
|
15 | ||
|
16 | public static TGrammar Instance{ | |
|
17 | get { | |
|
18 | if (_instance == null) | |
|
19 | _instance = new TGrammar(); | |
|
20 | return _instance; | |
|
21 | } | |
|
22 | } | |
|
23 | ||
|
24 | readonly CharAlphabet m_alphabet = new CharAlphabet(); | |
|
25 | ||
|
26 | public CharAlphabet Alphabet { | |
|
27 | get { return m_alphabet; } | |
|
28 | } | |
|
29 | ||
|
30 | public SymbolToken UnclassifiedToken() { | |
|
31 | return new SymbolToken(CharAlphabet.UNCLASSIFIED); | |
|
32 | } | |
|
33 | ||
|
34 | public void DefineAlphabet(IEnumerable<char> alphabet) { | |
|
35 | Safe.ArgumentNotNull(alphabet, "alphabet"); | |
|
36 | ||
|
37 | foreach (var ch in alphabet) | |
|
38 | m_alphabet.DefineSymbol(ch); | |
|
39 | } | |
|
40 | public Token SymbolRangeToken(char start, char end) { | |
|
41 | return SymbolToken(Enumerable.Range(start, end - start + 1).Select(x => (char)x)); | |
|
42 | } | |
|
43 | ||
|
44 | public Token SymbolToken(char symbol) { | |
|
45 | return Token.New(TranslateOrAdd(symbol)); | |
|
46 | } | |
|
47 | ||
|
48 | public Token SymbolToken(IEnumerable<char> symbols) { | |
|
49 | Safe.ArgumentNotNull(symbols, "symbols"); | |
|
50 | ||
|
51 | return Token.New(TranslateOrAdd(symbols).ToArray()); | |
|
52 | } | |
|
53 | ||
|
54 | public Token SymbolSetToken(params char[] set) { | |
|
55 | return SymbolToken(set); | |
|
56 | } | |
|
57 | ||
|
58 | int TranslateOrAdd(char ch) { | |
|
59 | var t = m_alphabet.Translate(ch); | |
|
60 | if (t == CharAlphabet.UNCLASSIFIED) | |
|
61 | t = m_alphabet.DefineSymbol(ch); | |
|
62 | return t; | |
|
63 | } | |
|
64 | ||
|
65 | IEnumerable<int> TranslateOrAdd(IEnumerable<char> symbols) { | |
|
66 | return symbols.Distinct().Select(TranslateOrAdd); | |
|
67 | } | |
|
68 | ||
|
69 | int TranslateOrDie(char ch) { | |
|
70 | var t = m_alphabet.Translate(ch); | |
|
71 | if (t == CharAlphabet.UNCLASSIFIED) | |
|
72 | throw new ApplicationException(String.Format("Symbol '{0}' is UNCLASSIFIED", ch)); | |
|
73 | return t; | |
|
74 | } | |
|
75 | ||
|
76 | IEnumerable<int> TranslateOrDie(IEnumerable<char> symbols) { | |
|
77 | return symbols.Distinct().Select(TranslateOrDie); | |
|
78 | } | |
|
79 | ||
|
80 | public Token SymbolTokenExcept(IEnumerable<char> symbols) { | |
|
81 | Safe.ArgumentNotNull(symbols, "symbols"); | |
|
82 | ||
|
83 | return Token.New( Enumerable.Range(0, m_alphabet.Count).Except(TranslateOrDie(symbols)).ToArray()); | |
|
84 | } | |
|
85 | ||
|
86 | protected CDFADefinition BuildDFA(Token lang) { | |
|
87 | Safe.ArgumentNotNull(lang, "lang"); | |
|
88 | ||
|
89 | var dfa = new CDFADefinition(m_alphabet); | |
|
90 | ||
|
91 | var builder = new DFABuilder(); | |
|
92 | ||
|
93 | lang.Accept( builder ); | |
|
94 | ||
|
95 | builder.BuildDFA(dfa); | |
|
96 | if (dfa.InitialStateIsFinal) | |
|
97 | throw new ApplicationException("The specified language contains empty token"); | |
|
98 | ||
|
99 | return dfa.Optimize(); | |
|
100 | } | |
|
101 | ||
|
102 | ||
|
103 | ||
|
104 | //protected abstract TGrammar CreateInstance(); | |
|
105 | } | |
|
106 | ||
|
107 | ||
|
108 | } |
@@ -1,48 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Threading.Tasks; | |
|
6 | ||
|
7 | namespace Implab.Parsing { | |
|
8 | /// <summary> | |
|
9 | /// Алфавит. Множество символов, которые разбиты на классы, при этом классы имеют непрерывную нумерацию, | |
|
10 | /// что позволяет использовать их в качестве индексов массивов. | |
|
11 | /// </summary> | |
|
12 | /// <remarks> | |
|
13 | /// <para>Алфавит является сюрьективным отображением множества символов в множество индексов, это позволяет сократить размер таблицы переходов автомата | |
|
14 | /// для входных символов, которые для него не различимы.</para> | |
|
15 | /// </remarks> | |
|
16 | /// <typeparam name="TSymbol">Тип символов.</typeparam> | |
|
17 | public interface IAlphabet<TSymbol> { | |
|
18 | /// <summary> | |
|
19 | /// Количество классов символов в алфавите. | |
|
20 | /// </summary> | |
|
21 | int Count { get; } | |
|
22 | ||
|
23 | /// <summary> | |
|
24 | /// Создает карту обратного сопоставления класса символов алфавита и сопоставленным | |
|
25 | /// ему исходным символам. | |
|
26 | /// </summary> | |
|
27 | /// <returns></returns> | |
|
28 | List<TSymbol>[] CreateReverseMap(); | |
|
29 | ||
|
30 | /// <summary> | |
|
31 | /// Создает новый алфавит на основе текущего, горппируя его сиволы в более | |
|
32 | /// крупные непересекающиеся классы символов. | |
|
33 | /// </summary> | |
|
34 | /// <param name="newAlphabet">Новый, пустой алфавит, в котором быдут определены классы.</param> | |
|
35 | /// <param name="classes">Множество классов символов текущего алфавита.</param> | |
|
36 | /// <returns>Карта для перехода классов текущего | |
|
37 | /// алфавита к классам нового.</returns> | |
|
38 | /// <remarks>Ползволяет укрупнить алфавит, объединив классы в текущем алфавите. Используется при оптимизации автомата.</remarks> | |
|
39 | int[] Reclassify(IAlphabetBuilder<TSymbol> newAlphabet, IEnumerable<ICollection<int>> classes); | |
|
40 | ||
|
41 | /// <summary> | |
|
42 | /// Преобразует входной символ в индекс символа из алфавита. | |
|
43 | /// </summary> | |
|
44 | /// <param name="symobl">Исходный символ</param> | |
|
45 | /// <returns>Индекс в алфавите</returns> | |
|
46 | int Translate(TSymbol symobl); | |
|
47 | } | |
|
48 | } |
@@ -1,25 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | ||
|
4 | namespace Implab.Parsing { | |
|
5 | public interface IAlphabetBuilder<TSymbol> : IAlphabet<TSymbol> { | |
|
6 | /// <summary> | |
|
7 | /// Добавляет новый символ в алфавит, если символ уже был добавлен, то | |
|
8 | /// возвращается ранее сопоставленный с символом класс. | |
|
9 | /// </summary> | |
|
10 | /// <param name="symbol">Символ для добавления.</param> | |
|
11 | /// <returns>Индекс класса, который попоставлен с символом.</returns> | |
|
12 | int DefineSymbol(TSymbol symbol); | |
|
13 | /// <summary> | |
|
14 | /// Доабвляем класс символов. Множеству указанных исходных символов | |
|
15 | /// будет сопоставлен символ в алфавите. | |
|
16 | /// </summary> | |
|
17 | /// <param name="symbols">Множестов исходных символов</param> | |
|
18 | /// <returns>Идентификатор символа алфавита.</returns> | |
|
19 | int DefineClass(IEnumerable<TSymbol> symbols); | |
|
20 | ||
|
21 | ||
|
22 | ||
|
23 | } | |
|
24 | } | |
|
25 |
@@ -1,61 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Threading.Tasks; | |
|
6 | ||
|
7 | namespace Implab.Parsing { | |
|
8 | /// <summary> | |
|
9 | /// Полностью описывает DFA автомат, его поведение, состояние и входные символы. | |
|
10 | /// </summary> | |
|
11 | /// <example> | |
|
12 | /// class MyAutomaton { | |
|
13 | /// int m_current; | |
|
14 | /// readonly DFAStateDescriptor<string>[] m_automaton; | |
|
15 | /// readonly IAlphabet<MyCommands> m_commands; | |
|
16 | /// | |
|
17 | /// public MyAutomaton(IDFADefinition<MyCommands,MyStates,string> definition) { | |
|
18 | /// m_current = definition.StateAlphabet.Translate(MyStates.Initial); | |
|
19 | /// m_automaton = definition.GetTransitionTable(); | |
|
20 | /// m_commands = definition.InputAlphabet; | |
|
21 | /// } | |
|
22 | /// | |
|
23 | /// // defined a method which will move the automaton to the next state | |
|
24 | /// public void Move(MyCommands cmd) { | |
|
25 | /// // use transition map to determine the next state | |
|
26 | /// var next = m_automaton[m_current].transitions[m_commands.Translate(cmd)]; | |
|
27 | /// | |
|
28 | /// // validate that we aren't in the unreachable state | |
|
29 | /// if (next == DFAConst.UNREACHABLE_STATE) | |
|
30 | /// throw new InvalidOperationException("The specified command is invalid"); | |
|
31 | /// | |
|
32 | /// // if everything is ok | |
|
33 | /// m_current = next; | |
|
34 | /// } | |
|
35 | /// } | |
|
36 | /// </example> | |
|
37 | public interface IDFADefinition<TInput, TState, TTag> { | |
|
38 | /// <summary> | |
|
39 | /// Алфавит входных символов | |
|
40 | /// </summary> | |
|
41 | /// <value>The input alphabet.</value> | |
|
42 | IAlphabet<TInput> InputAlphabet { | |
|
43 | get; | |
|
44 | } | |
|
45 | ||
|
46 | /// <summary> | |
|
47 | /// Алфавит состояний автомата | |
|
48 | /// </summary> | |
|
49 | /// <value>The state alphabet.</value> | |
|
50 | IAlphabet<TState> StateAlphabet { | |
|
51 | get; | |
|
52 | } | |
|
53 | ||
|
54 | /// <summary> | |
|
55 | /// Таблица переходов состояний автомата | |
|
56 | /// </summary> | |
|
57 | /// <returns>The transition table.</returns> | |
|
58 | DFAStateDescriptior<TTag>[] GetTransitionTable(); | |
|
59 | ||
|
60 | } | |
|
61 | } |
@@ -1,9 +0,0 | |||
|
1 | using System; | |
|
2 | ||
|
3 | namespace Implab.Parsing { | |
|
4 | public interface IDFADefinitionBuilder<TInput, TState, TTag> : IDFADefinition<TInput, TState, TTag> { | |
|
5 | ||
|
6 | ||
|
7 | } | |
|
8 | } | |
|
9 |
@@ -1,19 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | using System.Threading.Tasks; | |
|
6 | ||
|
7 | namespace Implab.Parsing { | |
|
8 | /// <summary> | |
|
9 | /// Интерфейс обходчика синтаксического дерева регулярного выражения | |
|
10 | /// </summary> | |
|
11 | public interface IVisitor { | |
|
12 | void Visit(AltToken token); | |
|
13 | void Visit(StarToken token); | |
|
14 | void Visit(CatToken token); | |
|
15 | void Visit(EmptyToken token); | |
|
16 | void Visit(EndToken token); | |
|
17 | void Visit(SymbolToken token); | |
|
18 | } | |
|
19 | } |
@@ -1,107 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Diagnostics; | |
|
5 | using System.Linq; | |
|
6 | using System.Text; | |
|
7 | using System.Threading.Tasks; | |
|
8 | ||
|
9 | namespace Implab.Parsing { | |
|
10 | /// <summary> | |
|
11 | /// Indexed alphabet is the finite set of symbols where each symbol has a zero-based unique index. | |
|
12 | /// </summary> | |
|
13 | public abstract class IndexedAlphabetBase<T> : IAlphabet<T> { | |
|
14 | public const int UNCLASSIFIED = 0; | |
|
15 | ||
|
16 | int m_nextId = 1; | |
|
17 | readonly int[] m_map; | |
|
18 | ||
|
19 | public int Count { | |
|
20 | get { return m_nextId; } | |
|
21 | } | |
|
22 | ||
|
23 | protected IndexedAlphabetBase(int mapSize) { | |
|
24 | m_map = new int[mapSize]; | |
|
25 | } | |
|
26 | ||
|
27 | protected IndexedAlphabetBase(int[] map) { | |
|
28 | Debug.Assert(map != null); | |
|
29 | ||
|
30 | m_map = map; | |
|
31 | m_nextId = map.Max() + 1; | |
|
32 | } | |
|
33 | ||
|
34 | public int DefineSymbol(T symbol) { | |
|
35 | var index = GetSymbolIndex(symbol); | |
|
36 | if (m_map[index] == UNCLASSIFIED) | |
|
37 | m_map[index] = m_nextId++; | |
|
38 | return m_map[index]; | |
|
39 | } | |
|
40 | ||
|
41 | public int DefineClass(IEnumerable<T> symbols) { | |
|
42 | Safe.ArgumentNotNull(symbols, "symbols"); | |
|
43 | symbols = symbols.Distinct(); | |
|
44 | ||
|
45 | foreach (var symbol in symbols) { | |
|
46 | var index = GetSymbolIndex(symbol); | |
|
47 | if (m_map[index] == UNCLASSIFIED) | |
|
48 | m_map[GetSymbolIndex(symbol)] = m_nextId; | |
|
49 | else | |
|
50 | throw new InvalidOperationException(String.Format("Symbol '{0}' already in use", symbol)); | |
|
51 | } | |
|
52 | return m_nextId++; | |
|
53 | } | |
|
54 | ||
|
55 | public List<T>[] CreateReverseMap() { | |
|
56 | return | |
|
57 | Enumerable.Range(UNCLASSIFIED, Count) | |
|
58 | .Select( | |
|
59 | i => InputSymbols | |
|
60 | .Where(x => i != UNCLASSIFIED && m_map[GetSymbolIndex(x)] == i) | |
|
61 | .ToList() | |
|
62 | ) | |
|
63 | .ToArray(); | |
|
64 | } | |
|
65 | ||
|
66 | public int[] Reclassify(IAlphabet<T> newAlphabet, IEnumerable<ICollection<int>> classes) { | |
|
67 | Safe.ArgumentNotNull(newAlphabet, "newAlphabet"); | |
|
68 | Safe.ArgumentNotNull(classes, "classes"); | |
|
69 | var reverseMap = CreateReverseMap(); | |
|
70 | ||
|
71 | int[] translationMap = new int[Count]; | |
|
72 | ||
|
73 | foreach (var scl in classes) { | |
|
74 | // skip if the supper class contains the unclassified element | |
|
75 | if (scl.Contains(UNCLASSIFIED)) | |
|
76 | continue; | |
|
77 | var range = new List<T>(); | |
|
78 | foreach (var cl in scl) { | |
|
79 | if (cl < 0 || cl >= reverseMap.Length) | |
|
80 | throw new ArgumentOutOfRangeException(String.Format("Class {0} is not valid for the current alphabet", cl)); | |
|
81 | range.AddRange(reverseMap[cl]); | |
|
82 | } | |
|
83 | var newClass = newAlphabet.DefineClass(range); | |
|
84 | foreach (var cl in scl) | |
|
85 | translationMap[cl] = newClass; | |
|
86 | } | |
|
87 | ||
|
88 | return translationMap; | |
|
89 | } | |
|
90 | ||
|
91 | public virtual int Translate(T symbol) { | |
|
92 | return m_map[GetSymbolIndex(symbol)]; | |
|
93 | } | |
|
94 | ||
|
95 | public abstract int GetSymbolIndex(T symbol); | |
|
96 | ||
|
97 | public abstract IEnumerable<T> InputSymbols { get; } | |
|
98 | ||
|
99 | /// <summary> | |
|
100 | /// Gets the translation map from the index of the symbol to it's class this is usefull for the optimized input symbols transtaion. | |
|
101 | /// </summary> | |
|
102 | /// <returns>The translation map.</returns> | |
|
103 | public int[] GetTranslationMap() { | |
|
104 | return m_map; | |
|
105 | } | |
|
106 | } | |
|
107 | } |
@@ -1,17 +0,0 | |||
|
1 | using System; | |
|
2 | using System.Collections.Generic; | |
|
3 | using System.Linq; | |
|
4 | using System.Text; | |
|
5 | ||
|
6 | namespace Implab.Parsing { | |
|
7 | [Serializable] | |
|
8 | public class ParserException : Exception { | |
|
9 | public ParserException() { } | |
|
10 | public ParserException(string message) : base(message) { } | |
|
11 | public ParserException(string message, Exception inner) : base(message, inner) { } | |
|
12 | protected ParserException( | |
|
13 | System.Runtime.Serialization.SerializationInfo info, | |
|
14 | System.Runtime.Serialization.StreamingContext context) | |
|
15 | : base(info, context) { } | |
|
16 | } | |
|
17 | } |
@@ -1,259 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.IO; | |
|
5 | using Implab.Components; | |
|
6 | ||
|
7 | namespace Implab.Parsing { | |
|
8 | /// <summary> | |
|
9 | /// Базовый класс для разбора потока входных символов на токены. | |
|
10 | /// </summary> | |
|
11 | /// <remarks> | |
|
12 | /// Сканнер имеет внутри буффер с симолами входного текста, по которому перемещаются два | |
|
13 | /// указателя, начала и конца токена, при перемещении искользуется ДКА для определения | |
|
14 | /// конца токена и допустимости текущего символа. | |
|
15 | /// </remarks> | |
|
16 | public abstract class Scanner : Disposable { | |
|
17 | struct ScannerConfig { | |
|
18 | public DFAStateDescriptior[] states; | |
|
19 | public int[] alphabetMap; | |
|
20 | } | |
|
21 | ||
|
22 | Stack<ScannerConfig> m_defs = new Stack<ScannerConfig>(); | |
|
23 | ||
|
24 | DFAStateDescriptior[] m_states; | |
|
25 | int[] m_alphabetMap; | |
|
26 | ||
|
27 | protected DFAStateDescriptior m_currentState; | |
|
28 | int m_previewCode; | |
|
29 | ||
|
30 | protected int m_tokenLen = 0; | |
|
31 | protected int m_tokenOffset; | |
|
32 | ||
|
33 | protected char[] m_buffer; | |
|
34 | protected int m_bufferSize; | |
|
35 | protected int m_pointer; | |
|
36 | ||
|
37 | TextReader m_reader; | |
|
38 | bool m_disposeReader; | |
|
39 | int m_chunkSize = 1024; // 1k | |
|
40 | int m_limit = 10 * 1024 * 1024; // 10Mb | |
|
41 | ||
|
42 | protected Scanner(DFAStateDescriptior[] states, int[] alphabet) { | |
|
43 | Safe.ArgumentNotEmpty(states, "states"); | |
|
44 | Safe.ArgumentNotNull(alphabet, "alphabet"); | |
|
45 | ||
|
46 | m_states = states; | |
|
47 | m_alphabetMap = alphabet; | |
|
48 | ||
|
49 | Feed(new char[0]); | |
|
50 | } | |
|
51 | ||
|
52 | /// <summary> | |
|
53 | /// Заполняет входными данными буффер. | |
|
54 | /// </summary> | |
|
55 | /// <param name="data">Данные для обработки.</param> | |
|
56 | /// <remarks>Копирование данных не происходит, переданный массив используется в | |
|
57 | /// качестве входного буффера.</remarks> | |
|
58 | public void Feed(char[] data) { | |
|
59 | Safe.ArgumentNotNull(data, "data"); | |
|
60 | ||
|
61 | Feed(data, data.Length); | |
|
62 | } | |
|
63 | ||
|
64 | /// <summary> | |
|
65 | /// Заполняет буффур чтения входными данными. | |
|
66 | /// </summary> | |
|
67 | /// <param name="data">Данные для обработки.</param> | |
|
68 | /// <param name="length">Длина данных для обработки.</param> | |
|
69 | /// <remarks>Копирование данных не происходит, переданный массив используется в | |
|
70 | /// качестве входного буффера.</remarks> | |
|
71 | public void Feed(char[] data, int length) { | |
|
72 | Safe.ArgumentNotNull(data, "data"); | |
|
73 | Safe.ArgumentInRange(length, 0, data.Length, "length"); | |
|
74 | AssertNotDisposed(); | |
|
75 | ||
|
76 | m_pointer = -1; | |
|
77 | m_buffer = data; | |
|
78 | m_bufferSize = length; | |
|
79 | Shift(); | |
|
80 | } | |
|
81 | ||
|
82 | public void Feed(TextReader reader, bool dispose) { | |
|
83 | Safe.ArgumentNotNull(reader, "reader"); | |
|
84 | AssertNotDisposed(); | |
|
85 | ||
|
86 | if (m_reader != null && m_disposeReader) | |
|
87 | m_reader.Dispose(); | |
|
88 | ||
|
89 | m_reader = reader; | |
|
90 | m_disposeReader = dispose; | |
|
91 | m_pointer = -1; | |
|
92 | m_buffer = new char[m_chunkSize]; | |
|
93 | m_bufferSize = 0; | |
|
94 | Shift(); | |
|
95 | } | |
|
96 | ||
|
97 | /// <summary> | |
|
98 | /// Получает текущий токен в виде строки. | |
|
99 | /// </summary> | |
|
100 | /// <returns></returns> | |
|
101 | protected string GetTokenValue() { | |
|
102 | return new String(m_buffer, m_tokenOffset, m_tokenLen); | |
|
103 | } | |
|
104 | ||
|
105 | /// <summary> | |
|
106 | /// Метки текущего токена, которые были назначены в регулярном выражении. | |
|
107 | /// </summary> | |
|
108 | protected int[] TokenTags { | |
|
109 | get { | |
|
110 | return m_currentState.tag; | |
|
111 | } | |
|
112 | } | |
|
113 | ||
|
114 | /// <summary> | |
|
115 | /// Признак конца данных | |
|
116 | /// </summary> | |
|
117 | public bool EOF { | |
|
118 | get { | |
|
119 | return m_pointer >= m_bufferSize; | |
|
120 | } | |
|
121 | } | |
|
122 | ||
|
123 | /// <summary> | |
|
124 | /// Читает следующий токен, при этом <see cref="m_tokenOffset"/> указывает на начало токена, | |
|
125 | /// <see cref="m_tokenLen"/> на длину токена, <see cref="m_buffer"/> - массив символов, в | |
|
126 | /// котором находится токен. | |
|
127 | /// </summary> | |
|
128 | /// <returns><c>false</c> - достигнут конец данных, токен не прочитан.</returns> | |
|
129 | protected bool ReadTokenInternal() { | |
|
130 | if (m_pointer >= m_bufferSize) | |
|
131 | return false; | |
|
132 | ||
|
133 | m_currentState = m_states[DFADefinition.INITIAL_STATE]; | |
|
134 | m_tokenLen = 0; | |
|
135 | m_tokenOffset = m_pointer; | |
|
136 | int nextState; | |
|
137 | do { | |
|
138 | nextState = m_currentState.transitions[m_previewCode]; | |
|
139 | if (nextState == DFADefinition.UNREACHEBLE_STATE) { | |
|
140 | if (m_currentState.final) | |
|
141 | return true; | |
|
142 | else | |
|
143 | throw new ParserException( | |
|
144 | String.Format( | |
|
145 | "Unexpected symbol '{0}', at pos {1}", | |
|
146 | m_buffer[m_pointer], | |
|
147 | Position | |
|
148 | ) | |
|
149 | ); | |
|
150 | } else { | |
|
151 | m_currentState = m_states[nextState]; | |
|
152 | m_tokenLen++; | |
|
153 | } | |
|
154 | ||
|
155 | } while (Shift()); | |
|
156 | ||
|
157 | // END OF DATA | |
|
158 | if (!m_currentState.final) | |
|
159 | throw new ParserException("Unexpected end of data"); | |
|
160 | ||
|
161 | return true; | |
|
162 | } | |
|
163 | ||
|
164 | ||
|
165 | bool Shift() { | |
|
166 | m_pointer++; | |
|
167 | ||
|
168 | if (m_pointer >= m_bufferSize) { | |
|
169 | if (!ReadNextChunk()) | |
|
170 | return false; | |
|
171 | } | |
|
172 | ||
|
173 | m_previewCode = m_alphabetMap[m_buffer[m_pointer]]; | |
|
174 | ||
|
175 | return true; | |
|
176 | } | |
|
177 | ||
|
178 | bool ReadNextChunk() { | |
|
179 | if (m_reader == null) | |
|
180 | return false; | |
|
181 | ||
|
182 | // extend buffer if nesessary | |
|
183 | if (m_pointer + m_chunkSize > m_buffer.Length) { | |
|
184 | // trim unused buffer head | |
|
185 | var size = m_tokenLen + m_chunkSize; | |
|
186 | if (size >= m_limit) | |
|
187 | throw new ParserException(String.Format("Input buffer {0} bytes limit exceeded", m_limit)); | |
|
188 | var temp = new char[size]; | |
|
189 | Array.Copy(m_buffer, m_tokenOffset, temp, 0, m_tokenLen); | |
|
190 | m_pointer -= m_tokenOffset; | |
|
191 | m_bufferSize -= m_tokenOffset; | |
|
192 | m_tokenOffset = 0; | |
|
193 | m_buffer = temp; | |
|
194 | } | |
|
195 | ||
|
196 | var read = m_reader.Read(m_buffer, m_tokenLen, m_chunkSize); | |
|
197 | if (read == 0) | |
|
198 | return false; | |
|
199 | ||
|
200 | m_bufferSize += read; | |
|
201 | ||
|
202 | return true; | |
|
203 | } | |
|
204 | ||
|
205 | /// <summary> | |
|
206 | /// Позиция сканнера во входном буфере | |
|
207 | /// </summary> | |
|
208 | public int Position { | |
|
209 | get { | |
|
210 | return m_pointer + 1; | |
|
211 | } | |
|
212 | } | |
|
213 | ||
|
214 | /// <summary> | |
|
215 | /// Преключает внутренний ДКА на указанный, позволяет реализовать подобие захватывающей | |
|
216 | /// группировки. | |
|
217 | /// </summary> | |
|
218 | /// <param name="states">Таблица состояний нового ДКА</param> | |
|
219 | /// <param name="alphabet">Таблица входных символов для нового ДКА</param> | |
|
220 | protected void Switch(DFAStateDescriptior[] states, int[] alphabet) { | |
|
221 | Safe.ArgumentNotNull(states, "dfa"); | |
|
222 | ||
|
223 | m_defs.Push(new ScannerConfig { | |
|
224 | states = m_states, | |
|
225 | alphabetMap = m_alphabetMap | |
|
226 | }); | |
|
227 | ||
|
228 | m_states = states; | |
|
229 | m_alphabetMap = alphabet; | |
|
230 | ||
|
231 | m_previewCode = m_alphabetMap[m_buffer[m_pointer]]; | |
|
232 | } | |
|
233 | ||
|
234 | /// <summary> | |
|
235 | /// Восстанавливает предыдущей ДКА сканнера. | |
|
236 | /// </summary> | |
|
237 | protected void Restore() { | |
|
238 | if (m_defs.Count == 0) | |
|
239 | throw new InvalidOperationException(); | |
|
240 | var prev = m_defs.Pop(); | |
|
241 | m_states = prev.states; | |
|
242 | m_alphabetMap = prev.alphabetMap; | |
|
243 | m_previewCode = m_alphabetMap[m_buffer[m_pointer]]; | |
|
244 | } | |
|
245 | ||
|
246 | protected override void Dispose(bool disposing) { | |
|
247 | if (disposing) { | |
|
248 | if (m_reader != null && m_disposeReader) | |
|
249 | m_reader.Dispose(); | |
|
250 | m_buffer = null; | |
|
251 | m_bufferSize = 0; | |
|
252 | m_pointer = 0; | |
|
253 | m_tokenLen = 0; | |
|
254 | m_tokenOffset = 0; | |
|
255 | } | |
|
256 | base.Dispose(disposing); | |
|
257 | } | |
|
258 | } | |
|
259 | } |
@@ -1,34 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using System.Text; | |
|
6 | using System.Threading.Tasks; | |
|
7 | ||
|
8 | namespace Implab.Parsing { | |
|
9 | /// <summary> | |
|
10 | /// Замыкание выражения с 0 и более повторов. | |
|
11 | /// </summary> | |
|
12 | public class StarToken: Token { | |
|
13 | ||
|
14 | Token m_token; | |
|
15 | ||
|
16 | public Token Token { | |
|
17 | get { return m_token; } | |
|
18 | } | |
|
19 | ||
|
20 | public StarToken(Token token) { | |
|
21 | Safe.ArgumentNotNull(token, "token"); | |
|
22 | m_token = token; | |
|
23 | } | |
|
24 | ||
|
25 | public override void Accept(IVisitor visitor) { | |
|
26 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
27 | visitor.Visit(this); | |
|
28 | } | |
|
29 | ||
|
30 | public override string ToString() { | |
|
31 | return String.Format("({0})*", Token.ToString()); | |
|
32 | } | |
|
33 | } | |
|
34 | } |
@@ -1,33 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Linq; | |
|
5 | using System.Text; | |
|
6 | using System.Threading.Tasks; | |
|
7 | ||
|
8 | namespace Implab.Parsing { | |
|
9 | /// <summary> | |
|
10 | /// Выражение, соответсвующее одному символу. | |
|
11 | /// </summary> | |
|
12 | public class SymbolToken : Token { | |
|
13 | int m_value; | |
|
14 | ||
|
15 | public int Value { | |
|
16 | get { return m_value; } | |
|
17 | } | |
|
18 | ||
|
19 | public SymbolToken(int value) { | |
|
20 | m_value = value; | |
|
21 | } | |
|
22 | public override void Accept(IVisitor visitor) { | |
|
23 | Safe.ArgumentNotNull(visitor, "visitor"); | |
|
24 | ||
|
25 | visitor.Visit(this); | |
|
26 | ||
|
27 | } | |
|
28 | ||
|
29 | public override string ToString() { | |
|
30 | return Value.ToString(); | |
|
31 | } | |
|
32 | } | |
|
33 | } |
@@ -1,67 +0,0 | |||
|
1 | using Implab; | |
|
2 | using System; | |
|
3 | using System.Collections.Generic; | |
|
4 | using System.Globalization; | |
|
5 | using System.Linq; | |
|
6 | using System.Text; | |
|
7 | using System.Threading.Tasks; | |
|
8 | ||
|
9 | namespace Implab.Parsing { | |
|
10 | public abstract class Token { | |
|
11 | public abstract void Accept(IVisitor visitor); | |
|
12 | ||
|
13 | public Token Extend() { | |
|
14 | return new CatToken(this, new EndToken()); | |
|
15 | } | |
|
16 | ||
|
17 | public Token Tag<T>(T tag) where T : IConvertible { | |
|
18 | return new CatToken(this, new EndToken(tag.ToInt32(CultureInfo.InvariantCulture))); | |
|
19 | } | |
|
20 | ||
|
21 | public Token Cat(Token right) { | |
|
22 | return new CatToken(this, right); | |
|
23 | } | |
|
24 | ||
|
25 | public Token Or(Token right) { | |
|
26 | return new AltToken(this, right); | |
|
27 | } | |
|
28 | ||
|
29 | public Token Optional() { | |
|
30 | return Or(new EmptyToken()); | |
|
31 | } | |
|
32 | ||
|
33 | public Token EClosure() { | |
|
34 | return new StarToken(this); | |
|
35 | } | |
|
36 | ||
|
37 | public Token Closure() { | |
|
38 | return new CatToken(this, new StarToken(this)); | |
|
39 | } | |
|
40 | ||
|
41 | public Token Repeat(int count) { | |
|
42 | Token token = null; | |
|
43 | ||
|
44 | for (int i = 0; i < count; i++) | |
|
45 | token = token != null ? token.Cat(this) : this; | |
|
46 | return token ?? new EmptyToken(); | |
|
47 | } | |
|
48 | ||
|
49 | public Token Repeat(int min, int max) { | |
|
50 | if (min > max || min < 1) | |
|
51 | throw new ArgumentOutOfRangeException(); | |
|
52 | var token = Repeat(min); | |
|
53 | ||
|
54 | for (int i = min; i < max; i++) | |
|
55 | token = token.Cat( this.Optional() ); | |
|
56 | return token; | |
|
57 | } | |
|
58 | ||
|
59 | public static Token New<T>(params T[] set) where T : struct, IConvertible { | |
|
60 | Safe.ArgumentNotNull(set, "set"); | |
|
61 | Token token = null; | |
|
62 | foreach(var c in set.Distinct()) | |
|
63 | token = token == null ? new SymbolToken(c.ToInt32(CultureInfo.InvariantCulture)) : token.Or(new SymbolToken(c.ToInt32(CultureInfo.InvariantCulture))); | |
|
64 | return token; | |
|
65 | } | |
|
66 | } | |
|
67 | } |
General Comments 0
You need to be logged in to leave comments.
Login now