[reflection] Coop handles icalls in System.Reflection and System.RuntimeTypeHandle...
[mono.git] / mcs / class / referencesource / System.Activities.Presentation / System.Activities.Presentation / System / Activities / Presentation / Xaml / SourceLocationExtensions.cs
1 // <copyright>
2 //   Copyright (c) Microsoft Corporation.  All rights reserved.
3 // </copyright>
4
5 namespace System.Activities.Presentation.Xaml
6 {
7     using System;
8     using System.Activities.Debugger;
9     using System.Runtime;
10
11     [Serializable]
12     internal static class SourceLocationExtensions
13     {
14         internal static bool Contains(this SourceLocation outer, SourceLocation inner)
15         {
16             Fx.Assert(inner != null && outer != null, "Argument should not be null");
17
18             if ((inner.StartLine > outer.StartLine || (inner.StartLine == outer.StartLine && inner.StartColumn >= outer.StartColumn))
19              && (inner.EndLine < outer.EndLine || (inner.EndLine == outer.EndLine && inner.EndColumn <= outer.EndColumn)))
20             {
21                 return true;
22             }
23
24             return false;
25         }
26     }
27 }