diff --git a/.gitignore b/.gitignore index a9ff785..0d7b9d9 100644 --- a/.gitignore +++ b/.gitignore @@ -124,6 +124,12 @@ publish/ ## TODO: If you have NuGet Package Restore enabled, uncomment the next line packages/ +# DotNet Core +project.lock.json + +# Visual Stduio 2015 +.vs/ + # Windows Azure Build Output csx *.build.csdef diff --git a/.nuget/packages.config b/.nuget/packages.config index 4b6704f..b50e3d2 100644 --- a/.nuget/packages.config +++ b/.nuget/packages.config @@ -3,7 +3,7 @@ - + diff --git a/Build.cmd b/Build.cmd index b5ecf0b..ed54adc 100644 --- a/Build.cmd +++ b/Build.cmd @@ -1,8 +1,8 @@ @echo off pushd %~dp0 -set msbuild="C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" -set log-dir=build\BuildOutput\log -set nuget-bin=build\BuildOutput\temp\nuget-bin +set msbuild="C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" +set log-dir=Build\BuildOutput\log +set nuget-bin=Build\BuildOutput\temp\nuget-bin set nuget=%nuget-bin%\nuget.exe set nuget-download=powershell.exe -NoProfile -Command "& {(New-Object System.Net.WebClient).DownloadFile('https://www.nuget.org/nuget.exe','%nuget%')}" set solutionFile=Relinq-EagerFetching.sln diff --git a/Build/Build.csproj b/Build/Build.csproj index ad9941d..2490aa4 100644 --- a/Build/Build.csproj +++ b/Build/Build.csproj @@ -51,6 +51,7 @@ .BuildProject + Designer diff --git a/Build/Customizations/DisableDependDB.targets b/Build/Customizations/DisableDependDB.targets new file mode 100644 index 0000000..4ff3945 --- /dev/null +++ b/Build/Customizations/DisableDependDB.targets @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Build/Customizations/PatchNuGetOutput.targets b/Build/Customizations/PatchNuGetOutput.targets new file mode 100644 index 0000000..238811b --- /dev/null +++ b/Build/Customizations/PatchNuGetOutput.targets @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_nuGetFiles Remove="@(_nuGetFiles)" /> + <_nuGetFiles Include="$(NuGetWithDebugSymbolsOutputDirectory)Remotion.Linq.EagerFetching.*.nupkg"> + $(TempDirectory)nuget\$([System.Guid]::NewGuid())\ + + <_nuGetFiles Include="$(NuGetWithSymbolServerSupportDirectory)Remotion.Linq.EagerFetching.*.nupkg" Exclude="$(NuGetWithSymbolServerSupportDirectory)Remotion.Linq.EagerFetching.*symbols.nupkg"> + $(TempDirectory)nuget\$([System.Guid]::NewGuid())\ + + <_nuGetFiles Include="$(NuGetWithSymbolServerSupportDirectory)Remotion.Linq.EagerFetching.*.symbols.nupkg"> + $(TempDirectory)nuget\$([System.Guid]::NewGuid())\ + + + + + + + + + + + <_namespaces Remove="@(_namespaces)" /> + <_namespaces Include="NuSpec"> + nuspec + http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd + + + + + + + + + + \ No newline at end of file diff --git a/Build/Customizations/Projects.props b/Build/Customizations/Projects.props index 45c3911..6e4f33c 100644 --- a/Build/Customizations/Projects.props +++ b/Build/Customizations/Projects.props @@ -10,9 +10,16 @@ True + + False + True + + True - True + + True + False @@ -23,6 +30,10 @@ net-4.0 + + net-4.5 + + diff --git a/Build/Customizations/releaseProcessScript.config b/Build/Customizations/releaseProcessScript.config index 084a147..820d143 100644 --- a/Build/Customizations/releaseProcessScript.config +++ b/Build/Customizations/releaseProcessScript.config @@ -23,7 +23,7 @@ Build/Customizations/Version.props - C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe + C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe @@ -49,4 +49,4 @@ - \ No newline at end of file + diff --git a/Build/Remotion.build b/Build/Remotion.build index 950c885..bcc768d 100644 --- a/Build/Remotion.build +++ b/Build/Remotion.build @@ -26,7 +26,8 @@ $(PackagesDirectory)DependDB.BuildProcessor.1.7.3.0\tools\ $(PackagesDirectory)DependDB.BuildProcessor.NuGetPreProcessor.1.7.3.0\tools\ $(PackagesDirectory)NUnit.Runners.2.6.3\tools\ - $(PackagesDirectory)NuGet.CommandLine.3.5.0\tools\ + + $(PackagesDirectory)NuGet.CommandLine.2.8.6\tools\ $(PackagesDirectory)NuGet.for.MSBuild.1.4.3\build\ $(PackagesDirectory)Remotion.BuildTools.MSBuildTasks.1.0.6180.28602\tools\ $(PackagesDirectory)Remotion.BuildScript.2.0.0-alpha017\BuildTargets\ @@ -175,4 +176,4 @@ - \ No newline at end of file + diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionAttribute.cs new file mode 100644 index 0000000..586b835 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionAttribute.cs @@ -0,0 +1,79 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates the condition parameter of the assertion method. + /// The method itself should be marked by attribute. + /// The mandatory argument of the attribute is the assertion type. + /// + /// + [AttributeUsage (AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)] + sealed partial class AssertionConditionAttribute : Attribute + { + private readonly AssertionConditionType myConditionType; + + /// + /// Initializes new instance of AssertionConditionAttribute + /// + /// Specifies condition type + public AssertionConditionAttribute (AssertionConditionType conditionType) + { + myConditionType = conditionType; + } + + /// + /// Gets condition type + /// + public AssertionConditionType ConditionType + { + get { return myConditionType; } + } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionType.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionType.cs new file mode 100644 index 0000000..ecca4a5 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionType.cs @@ -0,0 +1,77 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Specifies assertion type. If the assertion method argument satisifes the condition, then the execution continues. + /// Otherwise, execution is assumed to be halted + /// + enum AssertionConditionType + { + /// + /// Indicates that the marked parameter should be evaluated to true + /// + IS_TRUE = 0, + + /// + /// Indicates that the marked parameter should be evaluated to false + /// + IS_FALSE = 1, + + /// + /// Indicates that the marked parameter should be evaluated to null value + /// + IS_NULL = 2, + + /// + /// Indicates that the marked parameter should be evaluated to not null value + /// + IS_NOT_NULL = 3, + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionMethodAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionMethodAttribute.cs new file mode 100644 index 0000000..634164b --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionMethodAttribute.cs @@ -0,0 +1,60 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the marked method is assertion method, i.e. it halts control flow if one of the conditions is satisfied. + /// To set the condition, mark one of the parameters with attribute + /// + /// + [AttributeUsage (AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed partial class AssertionMethodAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/BaseTypeRequiredAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/BaseTypeRequiredAttribute.cs new file mode 100644 index 0000000..6785342 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/BaseTypeRequiredAttribute.cs @@ -0,0 +1,84 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// When applied to target attribute, specifies a requirement for any type which is marked with + /// target attribute to implement or inherit specific type or types + /// + /// + /// + /// [BaseTypeRequired(typeof(IComponent)] // Specify requirement + /// public class ComponentAttribute : Attribute + /// {} + /// + /// [Component] // ComponentAttribute requires implementing IComponent interface + /// public class MyComponent : IComponent + /// {} + /// + /// + [AttributeUsage (AttributeTargets.Class, AllowMultiple = true, Inherited = true)] + [BaseTypeRequired (typeof (Attribute))] + sealed partial class BaseTypeRequiredAttribute : Attribute + { + /// + /// Initializes new instance of BaseTypeRequiredAttribute + /// + /// Specifies which types are required + public BaseTypeRequiredAttribute (Type baseType) + { + BaseTypes = new[] { baseType }; + } + + /// + /// Gets enumerations of specified base types + /// + public Type[] BaseTypes { get; private set; } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CanBeNullAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CanBeNullAttribute.cs new file mode 100644 index 0000000..7bdc77b --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CanBeNullAttribute.cs @@ -0,0 +1,56 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the value of marked element could be null sometimes, so the check for null is necessary before its usage + /// + [AttributeUsage (AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Delegate | AttributeTargets.Field, AllowMultiple = false, Inherited = true)] + sealed partial class CanBeNullAttribute : Attribute { } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CannotApplyEqualityOperatorAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CannotApplyEqualityOperatorAttribute.cs new file mode 100644 index 0000000..538d5d0 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CannotApplyEqualityOperatorAttribute.cs @@ -0,0 +1,57 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the value of marked type (or its derivatives) cannot be compared using '==' or '!=' operators. + /// There is only exception to compare with null, it is permitted + /// + [AttributeUsage (AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)] + sealed partial class CannotApplyEqualityOperatorAttribute : Attribute { } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ContractAnnotationAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ContractAnnotationAttribute.cs new file mode 100644 index 0000000..2b5b2bb --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ContractAnnotationAttribute.cs @@ -0,0 +1,94 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Describes dependency between method input and output + /// + /// + ///

Function definition table syntax:

+ /// + /// FDT ::= FDTRow [;FDTRow]* + /// FDTRow ::= Input => Output | Output <= Input + /// Input ::= ParameterName: Value [, Input]* + /// Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + /// Value ::= true | false | null | notnull | canbenull + /// + /// If method has single input parameter, it's name could be omitted.
+ /// Using "halt" (or "void"/"nothing", which is the same) for method output means that methos doesn't return normally.
+ /// "canbenull" annotation is only applicable for output parameters.
+ /// You can use multiple [ContractAnnotation] for each FDT row, or use single attribute with rows separated by semicolon.
+ ///
+ /// + /// + /// [ContractAnnotation("=> halt")] public void TerminationMethod() + /// [ContractAnnotation("halt <= condition: false")] public void Assert(bool condition, string text) // Regular Assertion method + /// [ContractAnnotation("s:null => true")] public bool IsNullOrEmpty(string s) // String.IsNullOrEmpty + /// [ContractAnnotation("null => null; notnull => notnull")] public object Transform(object data) // Method which returns null if parameter is null, and not null if parameter is not null + /// [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] public bool TryParse(string s, out Person result) + /// + /// + [AttributeUsage (AttributeTargets.Method, AllowMultiple = true, Inherited = true)] + sealed partial class ContractAnnotationAttribute : Attribute + { + public ContractAnnotationAttribute ([NotNull] string fdt) + : this (fdt, false) + { + } + + public ContractAnnotationAttribute ([NotNull] string fdt, bool forceFullStates) + { + FDT = fdt; + ForceFullStates = forceFullStates; + } + + public string FDT { get; private set; } + public bool ForceFullStates { get; private set; } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseKindFlags.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseKindFlags.cs new file mode 100644 index 0000000..a38ccf5 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseKindFlags.cs @@ -0,0 +1,77 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + [Flags] + enum ImplicitUseKindFlags + { + Default = Access | Assign | InstantiatedWithFixedConstructorSignature, + + /// + /// Only entity marked with attribute considered used + /// + Access = 1, + + /// + /// Indicates implicit assignment to a member + /// + Assign = 2, + + /// + /// Indicates implicit instantiation of a type with fixed constructor signature. + /// That means any unused constructor parameters won't be reported as such. + /// + InstantiatedWithFixedConstructorSignature = 4, + + /// + /// Indicates implicit instantiation of a type + /// + InstantiatedNoFixedConstructorSignature = 8, + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseTargetFlags.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseTargetFlags.cs new file mode 100644 index 0000000..488dcee --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseTargetFlags.cs @@ -0,0 +1,71 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Specify what is considered used implicitly when marked with or + /// + [Flags] + enum ImplicitUseTargetFlags + { + Default = Itself, + + Itself = 1, + + /// + /// Members of entity marked with attribute are considered used + /// + Members = 2, + + /// + /// Entity marked with attribute and all its members considered used + /// + WithMembers = Itself | Members + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InstantHandleAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InstantHandleAttribute.cs new file mode 100644 index 0000000..336009c --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InstantHandleAttribute.cs @@ -0,0 +1,58 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + /// If the parameter is delegate, indicates that delegate is executed while the method is executed. + /// If the parameter is enumerable, indicates that it is enumerated while the method is executed. + /// + [AttributeUsage (AttributeTargets.Parameter, Inherited = true)] + sealed partial class InstantHandleAttribute : Attribute { } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InvokerParameterNameAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InvokerParameterNameAttribute.cs new file mode 100644 index 0000000..0813727 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InvokerParameterNameAttribute.cs @@ -0,0 +1,57 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the function argument should be string literal and match one of the parameters of the caller function. + /// For example, has such parameter. + /// + [AttributeUsage (AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)] + sealed partial class InvokerParameterNameAttribute : Attribute { } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LinqTunnelAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LinqTunnelAttribute.cs new file mode 100644 index 0000000..dd78daf --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LinqTunnelAttribute.cs @@ -0,0 +1,58 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that method is *pure* linq method, with postponed enumeration. C# iterator methods (yield ...) are always LinqTunnel. + /// + [AttributeUsage (AttributeTargets.Method)] + sealed partial class LinqTunnelAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LocalizationRequiredAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LocalizationRequiredAttribute.cs new file mode 100644 index 0000000..0cb9896 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LocalizationRequiredAttribute.cs @@ -0,0 +1,103 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that marked element should be localized or not. + /// + [AttributeUsage (AttributeTargets.All, AllowMultiple = false, Inherited = true)] + sealed partial class LocalizationRequiredAttribute : Attribute + { + /// + /// Initializes a new instance of the class with + /// set to . + /// + public LocalizationRequiredAttribute () + : this (true) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// true if a element should be localized; otherwise, false. + public LocalizationRequiredAttribute (bool required) + { + Required = required; + } + + /// + /// Gets a value indicating whether a element should be localized. + /// true if a element should be localized; otherwise, false. + /// + public bool Required { get; private set; } + + /// + /// Returns whether the value of the given object is equal to the current . + /// + /// The object to test the value equality of. + /// + /// true if the value of the given object is equal to that of the current; otherwise, false. + /// + public override bool Equals (object obj) + { + var attribute = obj as LocalizationRequiredAttribute; + return attribute != null && attribute.Required == Required; + } + + /// + /// Returns the hash code for this instance. + /// + /// A hash code for the current . + public override int GetHashCode () + { + return base.GetHashCode (); + } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/MeansImplicitUseAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/MeansImplicitUseAttribute.cs new file mode 100644 index 0000000..0607452 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/MeansImplicitUseAttribute.cs @@ -0,0 +1,81 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes as unused (as well as by other usage inspections) + /// + [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] + sealed partial class MeansImplicitUseAttribute : Attribute + { + public MeansImplicitUseAttribute () + : this (ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default) { } + + public MeansImplicitUseAttribute (ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags) + { + UseKindFlags = useKindFlags; + TargetFlags = targetFlags; + } + + public MeansImplicitUseAttribute (ImplicitUseKindFlags useKindFlags) + : this (useKindFlags, ImplicitUseTargetFlags.Default) + { + } + + public MeansImplicitUseAttribute (ImplicitUseTargetFlags targetFlags) + : this (ImplicitUseKindFlags.Default, targetFlags) { } + + public ImplicitUseKindFlags UseKindFlags { get; private set; } + + /// + /// Gets value indicating what is meant to be used + /// + public ImplicitUseTargetFlags TargetFlags { get; private set; } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NoEnumerationAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NoEnumerationAttribute.cs new file mode 100644 index 0000000..6715a51 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NoEnumerationAttribute.cs @@ -0,0 +1,59 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that IEnumarable, passed as parameter, is not enumerated. + /// + /// + [AttributeUsage(AttributeTargets.Parameter)] + sealed partial class NoEnumerationAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotNullAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotNullAttribute.cs new file mode 100644 index 0000000..5dc6ee3 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotNullAttribute.cs @@ -0,0 +1,56 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the value of marked element could never be null + /// + [AttributeUsage (AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Delegate | AttributeTargets.Field, AllowMultiple = false, Inherited = true)] + sealed partial class NotNullAttribute : Attribute { } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotifyPropertyChangedInvocatorAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotifyPropertyChangedInvocatorAttribute.cs new file mode 100644 index 0000000..3f4989c --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotifyPropertyChangedInvocatorAttribute.cs @@ -0,0 +1,65 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the function is used to notify class type property value is changed. + /// + [AttributeUsage (AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed partial class NotifyPropertyChangedInvocatorAttribute : Attribute + { + public NotifyPropertyChangedInvocatorAttribute () { } + public NotifyPropertyChangedInvocatorAttribute (string parameterName) + { + ParameterName = parameterName; + } + + public string ParameterName { get; private set; } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PathReferenceAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PathReferenceAttribute.cs new file mode 100644 index 0000000..1d74ef4 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PathReferenceAttribute.cs @@ -0,0 +1,63 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + [AttributeUsage (AttributeTargets.Parameter)] + sealed partial class PathReferenceAttribute : Attribute + { + public PathReferenceAttribute () { } + + public PathReferenceAttribute ([PathReference] string basePath) + { + BasePath = basePath; + } + + public string BasePath { get; private set; } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PublicAPIAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PublicAPIAttribute.cs new file mode 100644 index 0000000..a0c301e --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PublicAPIAttribute.cs @@ -0,0 +1,60 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// This attribute is intended to mark publicly available API which should not be removed and so is treated as used. + /// + [MeansImplicitUse] + sealed partial class PublicAPIAttribute : Attribute + { + public PublicAPIAttribute () { } + public PublicAPIAttribute (string comment) { } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PureAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PureAttribute.cs new file mode 100644 index 0000000..eb97791 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PureAttribute.cs @@ -0,0 +1,57 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that method doesn't contain observable side effects. + /// + // The same as + [AttributeUsage (AttributeTargets.Method, Inherited = true)] + sealed partial class PureAttribute : Attribute { } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ReSharperAnnotations Apache-2.0.licenseheader b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ReSharperAnnotations Apache-2.0.licenseheader new file mode 100644 index 0000000..bb94229 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ReSharperAnnotations Apache-2.0.licenseheader @@ -0,0 +1,37 @@ +extensions: .cs +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/StringFormatMethodAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/StringFormatMethodAttribute.cs new file mode 100644 index 0000000..b3d3223 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/StringFormatMethodAttribute.cs @@ -0,0 +1,73 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that marked method builds string by format pattern and (optional) arguments. + /// Parameter, which contains format string, should be given in constructor. + /// The format string should be in -like form + /// + [AttributeUsage (AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed partial class StringFormatMethodAttribute : Attribute + { + /// + /// Initializes new instance of StringFormatMethodAttribute + /// + /// Specifies which parameter of an annotated method should be treated as format-string + public StringFormatMethodAttribute (string formatParameterName) + { + FormatParameterName = formatParameterName; + } + + /// + /// Gets format parameter name + /// + public string FormatParameterName { get; private set; } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/TerminatesProgramAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/TerminatesProgramAttribute.cs new file mode 100644 index 0000000..2a3d47f --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/TerminatesProgramAttribute.cs @@ -0,0 +1,59 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the marked method unconditionally terminates control flow execution. + /// For example, it could unconditionally throw exception + /// + [AttributeUsage (AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed partial class TerminatesProgramAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/UsedImplicitlyAttribute.cs b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/UsedImplicitlyAttribute.cs new file mode 100644 index 0000000..61498df --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/UsedImplicitlyAttribute.cs @@ -0,0 +1,86 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + /// so this symbol will not be marked as unused (as well as by other usage inspections) + /// + [AttributeUsage (AttributeTargets.All, AllowMultiple = false, Inherited = true)] + sealed partial class UsedImplicitlyAttribute : Attribute + { + [UsedImplicitly] + public UsedImplicitlyAttribute () + : this (ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default) { } + + [UsedImplicitly] + public UsedImplicitlyAttribute (ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags) + { + UseKindFlags = useKindFlags; + TargetFlags = targetFlags; + } + + [UsedImplicitly] + public UsedImplicitlyAttribute (ImplicitUseKindFlags useKindFlags) + : this (useKindFlags, ImplicitUseTargetFlags.Default) { } + + [UsedImplicitly] + public UsedImplicitlyAttribute (ImplicitUseTargetFlags targetFlags) + : this (ImplicitUseKindFlags.Default, targetFlags) { } + + [UsedImplicitly] + public ImplicitUseKindFlags UseKindFlags { get; private set; } + + /// + /// Gets value indicating what is meant to be used + /// + [UsedImplicitly] + public ImplicitUseTargetFlags TargetFlags { get; private set; } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/ArgumentUtility.cs b/Core.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/ArgumentUtility.cs new file mode 100644 index 0000000..2753398 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/ArgumentUtility.cs @@ -0,0 +1,447 @@ +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +using System; +using System.Collections; +using System.Diagnostics; +using System.Reflection; +using JetBrains.Annotations; + +// ReSharper disable once CheckNamespace +namespace Remotion.Utilities +{ + /// + /// This utility class provides methods for checking arguments. + /// + /// + /// Some methods of this class return the value of the parameter. In some cases, this is useful because the value will be converted to another + /// type: + /// ("o", o); + /// } + /// ]]> + /// In some other cases, the input value is returned unmodified. This makes it easier to use the argument checks in calls to base class constructors + /// or property setters: + /// + /// + static partial class ArgumentUtility + { + [AssertionMethod] + public static T CheckNotNull ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] T actualValue) + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (actualValue == null) + // ReSharper restore CompareNonConstrainedGenericWithNull + throw new ArgumentNullException (argumentName); + + return actualValue; + } + + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckNotNull ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] T actualValue) + { + CheckNotNull (argumentName, actualValue); + } + + [AssertionMethod] + public static string CheckNotNullOrEmpty ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] string actualValue) + { + CheckNotNull (argumentName, actualValue); + if (actualValue.Length == 0) + throw CreateArgumentEmptyException (argumentName); + + return actualValue; + } + + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckNotNullOrEmpty ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] string actualValue) + { + CheckNotNullOrEmpty (argumentName, actualValue); + } + + [AssertionMethod] + public static T CheckNotNullOrEmpty ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T enumerable) + where T: IEnumerable + { + CheckNotNull (argumentName, enumerable); + CheckNotEmpty (argumentName, enumerable); + + return enumerable; + } + + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckNotNullOrEmpty ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T enumerable) + where T: IEnumerable + { + CheckNotNullOrEmpty (argumentName, enumerable); + } + + [AssertionMethod] + public static T CheckNotNullOrItemsNull ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T enumerable) + where T: IEnumerable + { + CheckNotNull (argumentName, enumerable); + + int i = 0; + foreach (object item in enumerable) + { + if (item == null) + throw CreateArgumentItemNullException (argumentName, i); + ++i; + } + + return enumerable; + } + + [AssertionMethod] + public static T CheckNotNullOrEmptyOrItemsNull ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T enumerable) + where T: IEnumerable + { + CheckNotNullOrItemsNull (argumentName, enumerable); + CheckNotEmpty (argumentName, enumerable); + + return enumerable; + } + + [AssertionMethod] + public static string CheckNotEmpty ([InvokerParameterName] string argumentName, string actualValue) + { + if (actualValue != null && actualValue.Length == 0) + throw CreateArgumentEmptyException (argumentName); + + return actualValue; + } + + [AssertionMethod] + public static T CheckNotEmpty ([InvokerParameterName] string argumentName, T enumerable) + where T: IEnumerable + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (enumerable != null) + // ReSharper restore CompareNonConstrainedGenericWithNull + { + var collection = enumerable as ICollection; + if (collection != null) + { + if (collection.Count == 0) + throw CreateArgumentEmptyException (argumentName); + else + return enumerable; + } + + IEnumerator enumerator = enumerable.GetEnumerator(); + var disposableEnumerator = enumerator as IDisposable; + using (disposableEnumerator) // using (null) is allowed in C# + { + if (!enumerator.MoveNext()) + throw CreateArgumentEmptyException (argumentName); + } + } + + return enumerable; + } + + [AssertionMethod] + public static Guid CheckNotEmpty ([InvokerParameterName] string argumentName, Guid actualValue) + { + if (actualValue == Guid.Empty) + throw CreateArgumentEmptyException (argumentName); + + return actualValue; + } + + public static object CheckNotNullAndType ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] object actualValue, + Type expectedType) + { + if (actualValue == null) + throw new ArgumentNullException (argumentName); + + // ReSharper disable UseMethodIsInstanceOfType + if (!expectedType.GetTypeInfo().IsAssignableFrom (actualValue.GetType().GetTypeInfo())) + throw CreateArgumentTypeException (argumentName, actualValue.GetType(), expectedType); + // ReSharper restore UseMethodIsInstanceOfType + + return actualValue; + } + + ///// Returns the value itself if it is not and of the specified value type. + ///// The type that must have. + ///// is . + ///// is an instance of another type (which is not a subclass of ). + //public static TExpected CheckNotNullAndType (string argumentName, object actualValue) + // where TExpected: class + //{ + // if (actualValue == null) + // throw new ArgumentNullException (argumentName); + // return CheckType (argumentName, actualValue); + //} + + /// Returns the value itself if it is not and of the specified value type. + /// The type that must have. + /// The is a . + /// The is an instance of another type. + public static TExpected CheckNotNullAndType ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] object actualValue) + // where TExpected: struct + { + if (actualValue == null) + throw new ArgumentNullException (argumentName); + + if (! (actualValue is TExpected)) + throw CreateArgumentTypeException (argumentName, actualValue.GetType(), typeof (TExpected)); + return (TExpected) actualValue; + } + + /// Checks of the is of the . + /// The is a . + /// The is an instance of another type. + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckNotNullAndType ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] object actualValue, + Type expectedType) + { + CheckNotNullAndType (argumentName, actualValue, expectedType); + } + + public static object CheckType ([InvokerParameterName] string argumentName, [NoEnumeration] object actualValue, Type expectedType) + { + if (actualValue == null) + { + if (NullableTypeUtility.IsNullableType_NoArgumentCheck (expectedType)) + return null; + else + throw CreateArgumentTypeException (argumentName, null, expectedType); + } + + // ReSharper disable UseMethodIsInstanceOfType + if (!expectedType.GetTypeInfo().IsAssignableFrom (actualValue.GetType().GetTypeInfo())) + throw CreateArgumentTypeException (argumentName, actualValue.GetType(), expectedType); + // ReSharper restore UseMethodIsInstanceOfType + + return actualValue; + } + + /// Returns the value itself if it is of the specified type. + /// The type that must have. + /// + /// is an instance of another type (which is not a subtype of ). + /// + /// is null and cannot be null. + /// + /// For non-nullable value types, you should use either or pass the type + /// instead. + /// + public static TExpected CheckType ([InvokerParameterName] string argumentName, [NoEnumeration] object actualValue) + { + if (actualValue == null) + { + try + { + return (TExpected) actualValue; + } + catch (NullReferenceException) + { + throw new ArgumentNullException (argumentName); + } + } + + if (!(actualValue is TExpected)) + throw CreateArgumentTypeException (argumentName, actualValue.GetType(), typeof (TExpected)); + + return (TExpected) actualValue; + } + + + /// Checks whether is not and can be assigned to . + /// The is . + /// The cannot be assigned to . + public static Type CheckNotNullAndTypeIsAssignableFrom ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] Type actualType, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] Type expectedType) + { + if (actualType == null) + throw new ArgumentNullException (argumentName); + return CheckTypeIsAssignableFrom (argumentName, actualType, expectedType); + } + + /// Checks whether can be assigned to . + /// The cannot be assigned to . + public static Type CheckTypeIsAssignableFrom ( + [InvokerParameterName] string argumentName, + Type actualType, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] Type expectedType) + { + CheckNotNull ("expectedType", expectedType); + if (actualType != null) + { + if (!expectedType.GetTypeInfo().IsAssignableFrom (actualType.GetTypeInfo())) + { + string message = string.Format ( + "Parameter '{0}' is a '{2}', which cannot be assigned to type '{1}'.", + argumentName, + expectedType, + actualType); + throw new ArgumentException (message, argumentName); + } + } + + return actualType; + } + + /// Checks whether can be assigned to . + /// The cannot be assigned to . + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckTypeIsAssignableFrom ( + [InvokerParameterName] string argumentName, + Type actualType, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] Type expectedType) + { + CheckTypeIsAssignableFrom (argumentName, actualType, expectedType); + } + + /// Checks whether all items in are of type or a null reference. + /// If at least one element is not of the specified type or a derived type. + public static T CheckItemsType ([InvokerParameterName] string argumentName, T collection, Type itemType) + where T: ICollection + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (collection != null) + // ReSharper restore CompareNonConstrainedGenericWithNull + { + int index = 0; + foreach (object item in collection) + { + // ReSharper disable UseMethodIsInstanceOfType + if (item != null && !itemType.GetTypeInfo().IsAssignableFrom (item.GetType().GetTypeInfo())) + throw CreateArgumentItemTypeException (argumentName, index, itemType, item.GetType()); + // ReSharper restore UseMethodIsInstanceOfType + + ++index; + } + } + + return collection; + } + + /// Checks whether all items in are of type and not null references. + /// If at least one element is not of the specified type or a derived type. + /// If at least one element is a null reference. + public static T CheckItemsNotNullAndType ([InvokerParameterName] string argumentName, T collection, Type itemType) + where T: ICollection + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (collection != null) + // ReSharper restore CompareNonConstrainedGenericWithNull + { + int index = 0; + foreach (object item in collection) + { + if (item == null) + throw CreateArgumentItemNullException (argumentName, index); + // ReSharper disable UseMethodIsInstanceOfType + if (!itemType.GetTypeInfo().IsAssignableFrom (item.GetType().GetTypeInfo())) + throw CreateArgumentItemTypeException (argumentName, index, itemType, item.GetType()); + // ReSharper restore UseMethodIsInstanceOfType + + ++index; + } + } + + return collection; + } + + public static ArgumentException CreateArgumentEmptyException ([InvokerParameterName] string argumentName) + { + return new ArgumentException (string.Format("Parameter '{0}' cannot be empty.", argumentName), argumentName); + } + + public static ArgumentException CreateArgumentTypeException ([InvokerParameterName] string argumentName, Type actualType, Type expectedType) + { + string actualTypeName = actualType != null ? actualType.ToString() : ""; + if (expectedType == null) + { + return new ArgumentException (string.Format ("Parameter '{0}' has unexpected type '{1}'.", argumentName, actualTypeName), argumentName); + } + else + { + return new ArgumentException ( + string.Format ("Parameter '{0}' has type '{2}' when type '{1}' was expected.", argumentName, expectedType, actualTypeName), + argumentName); + } + } + + public static ArgumentException CreateArgumentItemTypeException ( + [InvokerParameterName] string argumentName, + int index, + Type expectedType, + Type actualType) + { + return new ArgumentException ( + string.Format ( + "Item {0} of parameter '{1}' has the type '{2}' instead of '{3}'.", + index, + argumentName, + actualType, + expectedType), + argumentName); + } + + public static ArgumentNullException CreateArgumentItemNullException ([InvokerParameterName] string argumentName, int index) + { + return new ArgumentNullException (argumentName, string.Format ("Item {0} of parameter '{1}' is null.", index, argumentName)); + } + } +} \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader b/Core.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader new file mode 100644 index 0000000..505a480 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader @@ -0,0 +1,52 @@ +extensions: designer.cs +extensions: .cs +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +extensions: .xml + +extensions: .vb +' Copyright (c) rubicon IT GmbH, www.rubicon.eu +' +' See the NOTICE file distributed with this work for additional information +' regarding copyright ownership. rubicon licenses this file to you under +' the Apache License, Version 2.0 (the "License"); you may not use this +' file except in compliance with the License. You may obtain a copy of the +' License at +' +' http://www.apache.org/licenses/LICENSE-2.0 +' +' Unless required by applicable law or agreed to in writing, software +' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +' License for the specific language governing permissions and limitations +' under the License. +' \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.Utilities.Assertion.Sources.1.15.23.0/Assertion.cs b/Core.Net_4_5/App_Packages/Remotion.Utilities.Assertion.Sources.1.15.23.0/Assertion.cs new file mode 100644 index 0000000..234ba6a --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.Utilities.Assertion.Sources.1.15.23.0/Assertion.cs @@ -0,0 +1,175 @@ +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +using System; +using System.Diagnostics; +using JetBrains.Annotations; + +// ReSharper disable once CheckNamespace +namespace Remotion.Utilities +{ + /// + /// Provides methods that throw an if an assertion fails. + /// + /// + /// + /// This class contains methods that are conditional to the DEBUG and TRACE attributes ( and ). + /// + /// Note that assertion expressions passed to these methods are not evaluated (read: executed) if the respective symbol are not defined during + /// compilation, nor are the methods called. This increases performance for production builds, but make sure that your assertion expressions do + /// not cause any side effects! See or and the for more information + /// about conditional compilation. + /// + /// Assertions are no replacement for checking input parameters of public methods (see ). + /// + /// + static partial class Assertion + { + private const string c_msgIsTrue = "Assertion failed: Expression evaluates to true."; + private const string c_msgIsFalse = "Assertion failed: Expression evaluates to false."; + private const string c_msgIsNull = "Assertion failed: Expression evaluates to a null reference."; + private const string c_msgIsNotNull = "Assertion failed: Expression does not evaluate to a null reference."; + private static readonly object[] s_emptyArguments = new object[0]; + + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugAssert ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion, string message) + { + IsTrue (assertion, message); + } + + [Conditional ("DEBUG")] + [AssertionMethod] + [StringFormatMethod("message")] + public static void DebugAssert ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion, string message, params object[] arguments) + { + IsTrue (assertion, message, arguments); + } + + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugAssert ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion) + { + IsTrue (assertion); + } + + [Conditional ("TRACE")] + [AssertionMethod] + public static void TraceAssert ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion, string message) + { + IsTrue (assertion, message); + } + + [Conditional ("TRACE")] + [AssertionMethod] + [StringFormatMethod ("message")] + public static void TraceAssert ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion, string message, params object[] arguments) + { + IsTrue (assertion, message, arguments); + } + + [Conditional ("TRACE")] + [AssertionMethod] + public static void TraceAssert ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion) + { + IsTrue (assertion); + } + + [AssertionMethod] + public static void IsTrue ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion, string message) + { + IsTrue (assertion, message, s_emptyArguments); + } + + [AssertionMethod] + [StringFormatMethod("message")] + public static void IsTrue ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion, string message, params object[] arguments) + { + if (!assertion) + throw new InvalidOperationException (string.Format (message, arguments)); + } + + [AssertionMethod] + public static void IsTrue ([AssertionCondition (AssertionConditionType.IS_TRUE)] bool assertion) + { + IsTrue (assertion, c_msgIsFalse); + } + + [AssertionMethod] + public static void IsFalse ([AssertionCondition (AssertionConditionType.IS_FALSE)] bool expression, string message) + { + IsFalse (expression, message, s_emptyArguments); + } + + [AssertionMethod] + public static void IsFalse ([AssertionCondition (AssertionConditionType.IS_FALSE)] bool expression) + { + IsFalse (expression, c_msgIsTrue); + } + + [AssertionMethod] + [StringFormatMethod ("message")] + public static void IsFalse ([AssertionCondition (AssertionConditionType.IS_FALSE)] bool expression, string message, params object[] arguments) + { + if (expression) + throw new InvalidOperationException (string.Format (message, arguments)); + } + + [AssertionMethod] + public static T IsNotNull ([AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T obj, string message) + { + return IsNotNull (obj, message, s_emptyArguments); + } + + [AssertionMethod] + public static T IsNotNull ([AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T obj) + { + return IsNotNull (obj, c_msgIsNull); + } + + [AssertionMethod] + [StringFormatMethod ("message")] + public static T IsNotNull ([AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T obj, string message, params object[] arguments) + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (obj == null) + // ReSharper restore CompareNonConstrainedGenericWithNull + throw new InvalidOperationException (string.Format (message, arguments)); + + return obj; + } + + [AssertionMethod] + public static void IsNull ([AssertionCondition (AssertionConditionType.IS_NULL)] object obj, string message) + { + IsNull (obj, message, s_emptyArguments); + } + + [AssertionMethod] + public static void IsNull ([AssertionCondition (AssertionConditionType.IS_NULL)] object obj) + { + IsNull (obj, c_msgIsNotNull); + } + + [AssertionMethod] + [StringFormatMethod("message")] + public static void IsNull ([AssertionCondition (AssertionConditionType.IS_NULL)] object obj, string message, params object[] arguments) + { + if (obj != null) + throw new InvalidOperationException (string.Format (message, arguments)); + } + } +} diff --git a/Core.Net_4_5/App_Packages/Remotion.Utilities.Assertion.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader b/Core.Net_4_5/App_Packages/Remotion.Utilities.Assertion.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader new file mode 100644 index 0000000..505a480 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.Utilities.Assertion.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader @@ -0,0 +1,52 @@ +extensions: designer.cs +extensions: .cs +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +extensions: .xml + +extensions: .vb +' Copyright (c) rubicon IT GmbH, www.rubicon.eu +' +' See the NOTICE file distributed with this work for additional information +' regarding copyright ownership. rubicon licenses this file to you under +' the Apache License, Version 2.0 (the "License"); you may not use this +' file except in compliance with the License. You may obtain a copy of the +' License at +' +' http://www.apache.org/licenses/LICENSE-2.0 +' +' Unless required by applicable law or agreed to in writing, software +' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +' License for the specific language governing permissions and limitations +' under the License. +' \ No newline at end of file diff --git a/Core.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/NullableTypeUtility.cs b/Core.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/NullableTypeUtility.cs new file mode 100644 index 0000000..813216e --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/NullableTypeUtility.cs @@ -0,0 +1,67 @@ +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +using System; +using System.Reflection; + +// ReSharper disable once CheckNamespace +namespace Remotion.Utilities +{ + static partial class NullableTypeUtility + { + /// + /// Determines whether a type is nullable, ie. whether variables of it can be assigned . + /// + /// The type to check. + /// + /// true if is nullable; otherwise, false. + /// + /// + /// A type is nullable if it is a reference type or a nullable value type. This method returns false only for non-nullable value types. + /// + public static bool IsNullableType (Type type) + { + if (type == null) + throw new ArgumentNullException ("type"); + + return IsNullableType_NoArgumentCheck (type); + } + + internal static bool IsNullableType_NoArgumentCheck (Type expectedType) + { + return !expectedType.GetTypeInfo().IsValueType || Nullable.GetUnderlyingType (expectedType) != null; + } + + public static Type GetNullableType (Type type) + { + if (type == null) + throw new ArgumentNullException ("type"); + + if (IsNullableType (type)) + return type; + else + return typeof (Nullable<>).MakeGenericType (type); + } + + public static Type GetBasicType (Type type) + { + if (type == null) + throw new ArgumentNullException ("type"); + + return Nullable.GetUnderlyingType (type) ?? type; + } + } +} diff --git a/Core.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader b/Core.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader new file mode 100644 index 0000000..505a480 --- /dev/null +++ b/Core.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader @@ -0,0 +1,52 @@ +extensions: designer.cs +extensions: .cs +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +extensions: .xml + +extensions: .vb +' Copyright (c) rubicon IT GmbH, www.rubicon.eu +' +' See the NOTICE file distributed with this work for additional information +' regarding copyright ownership. rubicon licenses this file to you under +' the Apache License, Version 2.0 (the "License"); you may not use this +' file except in compliance with the License. You may obtain a copy of the +' License at +' +' http://www.apache.org/licenses/LICENSE-2.0 +' +' Unless required by applicable law or agreed to in writing, software +' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +' License for the specific language governing permissions and limitations +' under the License. +' \ No newline at end of file diff --git a/Core.Net_4_5/Core.Net_4_5.csproj b/Core.Net_4_5/Core.Net_4_5.csproj new file mode 100644 index 0000000..29f9a3a --- /dev/null +++ b/Core.Net_4_5/Core.Net_4_5.csproj @@ -0,0 +1,114 @@ + + + + + Debug + AnyCPU + {8B8E1924-8200-49BF-B8B4-D97968A834D2} + Library + Properties + Remotion.Linq.EagerFetching + Remotion.Linq.EagerFetching + v4.5 + 512 + + + + + true + full + false + bin\Debug\ + TRACE;DEBUG;NET_4_5 + prompt + 4 + bin\Debug\Remotion.Linq.EagerFetching.XML + 1591;419 + true + + + pdbonly + true + bin\Release\ + TRACE;NET_4_5 + prompt + 4 + bin\Release\Remotion.Linq.EagerFetching.XML + 1591;419 + true + + + true + + + ..\remotion.snk + + + + False + ..\packages\Remotion.Linq.2.0.0\lib\net45\Remotion.Linq.dll + + + + + + + + + + + + Properties\AssemblyInfoShared.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %(RecursiveDir)%(Filename)%(Extension) + + + + + LGPL.licenseheader + + + remotion.snk + + + + + + + + + + \ No newline at end of file diff --git a/Core.Net_4_5/packages.config b/Core.Net_4_5/packages.config new file mode 100644 index 0000000..9fbe6c0 --- /dev/null +++ b/Core.Net_4_5/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/Core/Build.targets b/Core/Build.targets new file mode 100644 index 0000000..80e3e8f --- /dev/null +++ b/Core/Build.targets @@ -0,0 +1,110 @@ + + + + + + $(MSBuildProjectDirectory)\..\packages\ + $(PackagesDirectory)MSBuild.Extension.Pack.1.5.0\tools\net40\ + $(MSBuildExtensionPackPath) + obj\netstandard1.0\RemotionPublic.snk + https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1 + + + + + + + + + + <_dotNetCoreIntermediateBasePath>$([System.IO.Path]::GetDirectoryName($(DotNetCorePublicKeyPath))) + + + + + + + + + + + + + $(TargetPath);$(DotNetCoreAssemblyPath) + + + + + + + + + + + + + + + + $(MSBuildProjectDirectory)\bin\$(Configuration)\netstandard1.0\ + $(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)$(Configuration)\netstandard1.0\ + $(DotNetCoreOutputPath)$(AssemblyName).dll + $(MSBuildProjectDirectory)\$(BaseIntermediateOutputPath)cli + $(DotNetCoreCliBasePath)\version.chk + $(DotNetCoreCliBasePath)\dotnet-install.ps1 + $(DotNetCoreCliBasePath)\bin + $(DotNetCoreCliInstallPath)\dotnet.exe + + + + + + <_downloadBootstrapCommand>-Command "Invoke-WebRequest -Uri '$(DotNetCoreCliBootstrapScriptUrl)' -OutFile '$(DotNetCoreCliBootstrapScriptPath)'" + <_installCommand>-File "$(DotNetCoreCliBootstrapScriptPath)" -Channel rel-1.0.0 -InstallDir "$(DotNetCoreCliInstallPath)" -NoPath -Version 1.0.0-preview2-003121 + <_oldVersion> + <_oldVersion Condition="Exists('$(DotNetCoreCliVersionPath)')">$([System.IO.File]::ReadAllText($(DotNetCoreCliVersionPath))) + + + + + + + + + + + + <_newVersion>$([System.IO.File]::ReadAllText($(DotNetCoreCliVersionPath))) + <_isCliUpdateRequired>False + <_isCliUpdateRequired Condition="'$(_oldVersion)' != '$(_newVersion)' OR !Exists('$(DotNetCoreCliInstallPath)')">True + + + + + + + + + + + + + + + + <_firstSNPath Remove="@(_firstSNPath)" /> + <_snPath Remove="@(_snPath)" /> + <_snPath Include="$(_frameworkSdkPath)**\sn.exe" /> + + + + + + + + @(_firstSNPath) + + + + + \ No newline at end of file diff --git a/Core/Core.csproj b/Core/Core.csproj index 7bcc489..681af0e 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -43,11 +43,11 @@ true full false - bin\Debug\ + bin\Debug\pcl\ TRACE;DEBUG; prompt 4 - bin\Debug\Remotion.Linq.EagerFetching.xml + bin\Debug\pcl\Remotion.Linq.EagerFetching.xml 1591;419 @@ -57,11 +57,11 @@ pdbonly true - bin\Release\ + bin\Release\pcl\ TRACE; prompt 4 - bin\Release\Remotion.Linq.EagerFetching.xml + bin\Release\pcl\Remotion.Linq.EagerFetching.xml 1591;419 @@ -133,15 +133,18 @@ + + + + + + + $(CleanDependsOn); + DotNetCore_Clean; + + + $(BuildDependsOn); + DotNetCore_Build + + \ No newline at end of file diff --git a/Core/Core.nuspec b/Core/Core.nuspec index 2ac6e06..a981b7f 100644 --- a/Core/Core.nuspec +++ b/Core/Core.nuspec @@ -10,17 +10,20 @@ http://relinq.codeplex.com $description$ $copyright$ - $tags$ $extraTags$ + re-motion LINQ Eager Fetching $extraTags$ - + + + + - - + +
\ No newline at end of file diff --git a/Core/Properties/AssemblyInfo.cs b/Core/Properties/AssemblyInfo.cs index d0dec86..35e546c 100644 --- a/Core/Properties/AssemblyInfo.cs +++ b/Core/Properties/AssemblyInfo.cs @@ -21,7 +21,7 @@ [assembly: AssemblyTitle ("re-linq Eager Fetching Support")] [assembly: AssemblyDescription ("Allows LINQ providers based on re-linq Frontend to support eager fetching.")] -#if !NET_4_0 && !NET_3_5 +#if !NET_4_5 && !NET_4_0 && !NET_3_5 [assembly: AssemblyMetadata ("tags", "re-motion LINQ EagerFetching")] #endif [assembly: AssemblyCulture ("")] diff --git a/Core/project.json b/Core/project.json new file mode 100644 index 0000000..7975efe --- /dev/null +++ b/Core/project.json @@ -0,0 +1,29 @@ +{ + "name": "Remotion.Linq.EagerFetching", + "buildOptions": { + "compile": { + "include": [ "**/*.cs", "../AssemblyInfoShared.cs" ], + "exclude": [ "bin/**", "obj/**" ] + }, + "xmlDoc": true, + "warningsAsErrors": true, + "nowarn": [ "1591", "419" ], + "keyFile": "obj/netstandard1.0/RemotionPublic.snk", + "delaySign": true + }, + "frameworks": { + "netstandard1.0": { + "// comment" : "WARNING: When updating this list, the dependency list in Core.nuspec and the list in PatchNuGetOutput.targets must also be updated.", + "dependencies": { + "Remotion.Linq": "2.1.1", + "System.Collections": "4.0.11", + "System.Linq": "4.1.0", + "System.Linq.Expressions": "4.1.0", + "System.ObjectModel": "4.0.12", + "System.Reflection": "4.1.0", + "System.Runtime": "4.1.0" + } + }, + ".NETPortable,Version=v4.5,Profile=Profile259" : { } + } +} diff --git a/Relinq-EagerFetching.sln b/Relinq-EagerFetching.sln index 2c586a6..03eef66 100644 --- a/Relinq-EagerFetching.sln +++ b/Relinq-EagerFetching.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "Core\Core.csproj", "{48204C1E-34F2-4B88-A01A-625DD05CB117}" EndProject @@ -28,6 +28,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Net_3_5", "Core.Net_3_ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.Net_3_5", "UnitTests.Net_3_5\UnitTests.Net_3_5.csproj", "{F010A245-CA51-4566-BBA9-69BC1C734BBC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Net_4_5", "Core.Net_4_5\Core.Net_4_5.csproj", "{8B8E1924-8200-49BF-B8B4-D97968A834D2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.Net_4_5", "UnitTests.Net_4_5\UnitTests.Net_4_5.csproj", "{888F6B38-E543-429D-BF47-B6DB380272B3}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -60,6 +64,14 @@ Global {F010A245-CA51-4566-BBA9-69BC1C734BBC}.Debug|Any CPU.Build.0 = Debug|Any CPU {F010A245-CA51-4566-BBA9-69BC1C734BBC}.Release|Any CPU.ActiveCfg = Release|Any CPU {F010A245-CA51-4566-BBA9-69BC1C734BBC}.Release|Any CPU.Build.0 = Release|Any CPU + {8B8E1924-8200-49BF-B8B4-D97968A834D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B8E1924-8200-49BF-B8B4-D97968A834D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B8E1924-8200-49BF-B8B4-D97968A834D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B8E1924-8200-49BF-B8B4-D97968A834D2}.Release|Any CPU.Build.0 = Release|Any CPU + {888F6B38-E543-429D-BF47-B6DB380272B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {888F6B38-E543-429D-BF47-B6DB380272B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {888F6B38-E543-429D-BF47-B6DB380272B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {888F6B38-E543-429D-BF47-B6DB380272B3}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Relinq-EagerFetching.sln.DotSettings b/Relinq-EagerFetching.sln.DotSettings index 55fd239..56016a6 100644 --- a/Relinq-EagerFetching.sln.DotSettings +++ b/Relinq-EagerFetching.sln.DotSettings @@ -149,7 +149,9 @@ True True True + True True + True True True True diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.Development.UnitTesting.PrivateInvoke.Sources.1.15.23.0/PrivateInvoke.cs b/UnitTests.Net_4_5/App_Packages/Remotion.Development.UnitTesting.PrivateInvoke.Sources.1.15.23.0/PrivateInvoke.cs new file mode 100644 index 0000000..49d6b3f --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.Development.UnitTesting.PrivateInvoke.Sources.1.15.23.0/PrivateInvoke.cs @@ -0,0 +1,426 @@ +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +using System; +using System.Diagnostics; +using System.Globalization; +using System.Reflection; +using Remotion.Utilities; + +// ReSharper disable once CheckNamespace +namespace Remotion.Development.UnitTesting +{ + /// + /// Provides utility functions for accessing non-public types and members. + /// + static partial class PrivateInvoke + { + // static members + + private static MethodInfo GetMethod (Type type, string methodName, BindingFlags bindingFlags, object[] arguments) + { + Debug.Assert (methodName != null); + return (MethodInfo) GetMethodBaseInternal (type, methodName, type.GetMethods (bindingFlags), arguments); + } + + private static ConstructorInfo GetConstructor (Type type, BindingFlags bindingFlags, object[] arguments) + { + return (ConstructorInfo) GetMethodBaseInternal (type, null, type.GetConstructors (bindingFlags), arguments); + } + + private static MethodBase GetMethodBaseInternal (Type type, string methodName, MethodBase[] methods, object[] arguments) + { + MethodBase callMethod = null; + + foreach (MethodBase method in methods) + { + if (methodName == null || methodName == method.Name) + { + ParameterInfo[] parameters = method.GetParameters (); + if (parameters.Length == arguments.Length) + { + bool isMatch = true; + for (int i = 0; i < parameters.Length; ++i) + { + object argument = arguments[i]; + Type parameterType = parameters[i].ParameterType; + + if (! ( (argument == null && ! parameterType.IsValueType) // null is a valid argument for any reference type + || (argument != null && parameterType.IsAssignableFrom (argument.GetType())))) + { + isMatch = false; + break; + } + } + if (isMatch) + { + if (callMethod != null) + { + var message = string.Format ("There is no method \"{0}\" in type {1} that accepts the specified argument types.", methodName, type); + throw new AmbiguousMatchException (message); + } + + callMethod = method; + } + } + } + } + if (callMethod == null) + throw new MissingMethodException (type.Name, methodName); + + return callMethod; + } + + private static PropertyInfo GetPropertyRecursive (Type type, BindingFlags bindingFlags, string propertyName) + { + for (PropertyInfo property = null; type != null; type = type.BaseType) + { + property = type.GetProperty (propertyName, bindingFlags); + if (property != null) + return property; + } + return null; + } + + private static FieldInfo GetFieldRecursive (Type type, BindingFlags bindingFlags, string fieldName) + { + for (FieldInfo field = null; type != null; type = type.BaseType) + { + field = type.GetField (fieldName, bindingFlags); + if (field != null) + return field; + } + return null; + } + + #region InvokeMethod methods + + public static object InvokeNonPublicStaticMethod (Type type, string methodName, params object[] arguments) + { + ArgumentUtility.CheckNotNull ("type", type); + ArgumentUtility.CheckNotNullOrEmpty ("methodName", methodName); + + return InvokeMethodInternal (null, type, BindingFlags.Static | BindingFlags.NonPublic, methodName, arguments); + } + + public static object InvokePublicStaticMethod (Type type, string methodName, params object[] arguments) + { + ArgumentUtility.CheckNotNull ("type", type); + ArgumentUtility.CheckNotNullOrEmpty ("methodName", methodName); + + return InvokeMethodInternal (null, type, BindingFlags.Static | BindingFlags.Public, methodName, arguments); + } + + public static object InvokeNonPublicMethod (object target, string methodName, params object[] arguments) + { + ArgumentUtility.CheckNotNull ("target", target); + + return InvokeNonPublicMethod (target, target.GetType(), methodName, arguments); + } + + public static object InvokeNonPublicMethod (object target, Type definingType, string methodName, params object[] arguments) + { + ArgumentUtility.CheckNotNull ("target", target); + ArgumentUtility.CheckNotNull ("definingType", definingType); + ArgumentUtility.CheckType ("target", target, definingType); + ArgumentUtility.CheckNotNullOrEmpty ("methodName", methodName); + + return InvokeMethodInternal (target, definingType, BindingFlags.Instance | BindingFlags.NonPublic, methodName, arguments); + } + + public static object InvokePublicMethod (object target, string methodName, params object[] arguments) + { + ArgumentUtility.CheckNotNull ("target", target); + ArgumentUtility.CheckNotNullOrEmpty ("methodName", methodName); + + return InvokeMethodInternal (target, target.GetType(), BindingFlags.Instance | BindingFlags.Public, methodName, arguments); + } + + private static object InvokeMethodInternal (object instance, Type type, BindingFlags bindingFlags, string methodName, object[] arguments) + { + if (arguments == null) + arguments = new object[] { null }; + + MethodInfo callMethod = GetMethod (type, methodName, bindingFlags, arguments); + + try + { + return callMethod.Invoke (instance, bindingFlags, null, arguments, CultureInfo.InvariantCulture); + } + catch (TargetInvocationException e) + { + throw e.InnerException.PreserveStackTrace(); + } + } + + #endregion + + #region CreateInstance methods + + public static object CreateInstancePublicCtor (string assemblyString, string typeName, params object[] arguments) + { + return CreateInstancePublicCtor (Assembly.Load (assemblyString), typeName, arguments); + } + + public static object CreateInstancePublicCtor (Assembly assembly, string typeName, params object[] arguments) + { + return CreateInstancePublicCtor (assembly.GetType (typeName, true, false), arguments); + } + + public static object CreateInstancePublicCtor (Type type, params object[] arguments) + { + return CreateInstanceInternal (type, true, arguments); + } + + public static object CreateInstanceNonPublicCtor (string assemblyString, string typeName, params object[] arguments) + { + return CreateInstanceNonPublicCtor (Assembly.Load (assemblyString), typeName, arguments); + } + + public static object CreateInstanceNonPublicCtor (Assembly assembly, string typeName, params object[] arguments) + { + return CreateInstanceNonPublicCtor (assembly.GetType (typeName, true, false), arguments); + } + + public static object CreateInstanceNonPublicCtor (Type type, params object[] arguments) + { + return CreateInstanceInternal (type, false, arguments); + } + + private static object CreateInstanceInternal (Type type, bool isPublic, object[] arguments) + { + if (arguments == null) + arguments = new object[] { null }; + + BindingFlags bindingFlags = BindingFlags.Instance; + bindingFlags |= isPublic ? BindingFlags.Public : BindingFlags.NonPublic; + + ConstructorInfo ctor = GetConstructor (type, bindingFlags, arguments); + + try + { + return ctor.Invoke (BindingFlags.CreateInstance, null, arguments, CultureInfo.InvariantCulture); + } + catch (TargetInvocationException e) + { + throw e.InnerException.PreserveStackTrace (); + } + } + + #endregion + + #region GetProperty methods + + public static object GetPublicProperty (object target, string propertyName) + { + if (target == null) throw new ArgumentNullException ("target"); + return GetPropertyInternal (target, target.GetType(), BindingFlags.Instance | BindingFlags.Public, propertyName); + } + + public static object GetNonPublicProperty (object target, string propertyName) + { + if (target == null) throw new ArgumentNullException ("target"); + return GetPropertyInternal (target, target.GetType(), BindingFlags.Instance | BindingFlags.NonPublic, propertyName); + } + + public static object GetNonPublicProperty (object target, Type declaringType, string propertyName) + { + ArgumentUtility.CheckNotNull ("target", target); + ArgumentUtility.CheckNotNull ("declaringType", declaringType); + + return GetPropertyInternal (target, declaringType, BindingFlags.Instance | BindingFlags.NonPublic, propertyName); + } + + public static object GetPublicStaticProperty (Type type, string propertyName) + { + if (type == null) throw new ArgumentNullException ("type"); + return GetPropertyInternal (null, type, BindingFlags.Static | BindingFlags.Public, propertyName); + } + + public static object GetNonPublicStaticProperty (Type type, string propertyName) + { + if (type == null) throw new ArgumentNullException ("type"); + return GetPropertyInternal (null, type, BindingFlags.Static | BindingFlags.NonPublic, propertyName); + } + + private static object GetPropertyInternal (object instance, Type type, BindingFlags bindingFlags, string propertyName) + { + PropertyInfo property = GetPropertyRecursive (type, bindingFlags, propertyName); + if (property == null) + { + throw new ArgumentException ("No property '" + propertyName + "' found on type '" + type.FullName + "' with binding flags '" + bindingFlags + "'.", + "propertyName"); + } + + try + { + return property.GetValue (instance, new object[] {}); + } + catch (TargetInvocationException e) + { + throw e.InnerException.PreserveStackTrace (); + } + } + + #endregion + + #region SetProperty methods + + public static void SetPublicProperty (object target, string propertyName, object value) + { + if (target == null) throw new ArgumentNullException ("target"); + SetPropertyInternal (target, target.GetType(), BindingFlags.Instance | BindingFlags.Public, propertyName, value); + } + + public static void SetNonPublicProperty (object target, string propertyName, object value) + { + if (target == null) throw new ArgumentNullException ("target"); + SetPropertyInternal (target, target.GetType(), BindingFlags.Instance | BindingFlags.NonPublic, propertyName, value); + } + + public static void SetNonPublicProperty (object target, Type declaringType, string propertyName, object value) + { + if (target == null) + throw new ArgumentNullException ("target"); + SetPropertyInternal (target, declaringType, BindingFlags.Instance | BindingFlags.NonPublic, propertyName, value); + } + + public static void SetPublicStaticProperty (Type type, string propertyName, object value) + { + if (type == null) throw new ArgumentNullException ("type"); + PropertyInfo property = type.GetProperty (propertyName, BindingFlags.Static | BindingFlags.Public); + SetPropertyInternal (null, type, BindingFlags.Static | BindingFlags.Public, propertyName, value); + } + + public static void SetNonPublicStaticProperty (Type type, string propertyName, object value) + { + if (type == null) throw new ArgumentNullException ("type"); + SetPropertyInternal (null, type, BindingFlags.Static | BindingFlags.NonPublic, propertyName, value); + } + + private static void SetPropertyInternal (object instance, Type type, BindingFlags bindingFlags, string propertyName, object value) + { + PropertyInfo property = GetPropertyRecursive (type, bindingFlags, propertyName); + try + { + property.SetValue (instance, value, new object[] {}); + } + catch (TargetInvocationException e) + { + throw e.InnerException.PreserveStackTrace (); + } + } + + #endregion + + #region GetField methods + + public static object GetPublicField (object target, string fieldName) + { + if (target == null) throw new ArgumentNullException ("target"); + return GetFieldInternal (target, target.GetType(), BindingFlags.Instance | BindingFlags.Public, fieldName); + } + + public static object GetNonPublicField (object target, string fieldName) + { + if (target == null) throw new ArgumentNullException ("target"); + var declaringType = target.GetType(); + return GetNonPublicField(target, declaringType, fieldName); + } + + public static object GetNonPublicField(object target, Type declaringType, string fieldName) + { + ArgumentUtility.CheckNotNull ("target", target); + ArgumentUtility.CheckNotNull ("declaringType", declaringType); + + return GetFieldInternal (target, declaringType, BindingFlags.Instance | BindingFlags.NonPublic, fieldName); + } + + public static object GetPublicStaticField (Type type, string fieldName) + { + if (type == null) throw new ArgumentNullException ("type"); + return GetFieldInternal (null, type, BindingFlags.Static | BindingFlags.Public, fieldName); + } + + public static object GetNonPublicStaticField (Type type, string fieldName) + { + if (type == null) throw new ArgumentNullException ("type"); + return GetFieldInternal (null, type, BindingFlags.Static | BindingFlags.NonPublic, fieldName); + } + + private static object GetFieldInternal (object instance, Type type, BindingFlags bindingFlags, string fieldName) + { + FieldInfo field = GetFieldRecursive (type, bindingFlags, fieldName); + if (field == null) + { + throw new ArgumentException ("No field '" + fieldName + "' found on type '" + type.FullName + "' with binding flags '" + bindingFlags + "'.", + "fieldName"); + } + + try + { + return field.GetValue (instance); + } + catch (TargetInvocationException e) + { + throw e.InnerException.PreserveStackTrace (); + } + } + + #endregion + + #region SetField methods + + public static void SetPublicField (object target, string fieldName, object value) + { + if (target == null) throw new ArgumentNullException ("target"); + SetFieldInternal (target, target.GetType(), BindingFlags.Instance | BindingFlags.Public, fieldName, value); + } + + public static void SetNonPublicField (object target, string fieldName, object value) + { + if (target == null) throw new ArgumentNullException ("target"); + SetFieldInternal (target, target.GetType(), BindingFlags.Instance | BindingFlags.NonPublic, fieldName, value); + } + + public static void SetPublicStaticField (Type type, string fieldName, object value) + { + if (type == null) throw new ArgumentNullException ("type"); + SetFieldInternal (null, type, BindingFlags.Static | BindingFlags.Public, fieldName, value); + } + + public static void SetNonPublicStaticField (Type type, string fieldName, object value) + { + if (type == null) throw new ArgumentNullException ("type"); + SetFieldInternal (null, type, BindingFlags.Static | BindingFlags.NonPublic, fieldName, value); + } + + private static void SetFieldInternal (object instance, Type type, BindingFlags bindingFlags, string fieldName, object value) + { + FieldInfo field = GetFieldRecursive (type, bindingFlags, fieldName); + try + { + field.SetValue (instance, value); + } + catch (TargetInvocationException e) + { + throw e.InnerException.PreserveStackTrace (); + } + } + + #endregion + } +} diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.Development.UnitTesting.PrivateInvoke.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader b/UnitTests.Net_4_5/App_Packages/Remotion.Development.UnitTesting.PrivateInvoke.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader new file mode 100644 index 0000000..505a480 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.Development.UnitTesting.PrivateInvoke.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader @@ -0,0 +1,52 @@ +extensions: designer.cs +extensions: .cs +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +extensions: .xml + +extensions: .vb +' Copyright (c) rubicon IT GmbH, www.rubicon.eu +' +' See the NOTICE file distributed with this work for additional information +' regarding copyright ownership. rubicon licenses this file to you under +' the Apache License, Version 2.0 (the "License"); you may not use this +' file except in compliance with the License. You may obtain a copy of the +' License at +' +' http://www.apache.org/licenses/LICENSE-2.0 +' +' Unless required by applicable law or agreed to in writing, software +' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +' License for the specific language governing permissions and limitations +' under the License. +' \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionAttribute.cs new file mode 100644 index 0000000..586b835 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionAttribute.cs @@ -0,0 +1,79 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates the condition parameter of the assertion method. + /// The method itself should be marked by attribute. + /// The mandatory argument of the attribute is the assertion type. + /// + /// + [AttributeUsage (AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)] + sealed partial class AssertionConditionAttribute : Attribute + { + private readonly AssertionConditionType myConditionType; + + /// + /// Initializes new instance of AssertionConditionAttribute + /// + /// Specifies condition type + public AssertionConditionAttribute (AssertionConditionType conditionType) + { + myConditionType = conditionType; + } + + /// + /// Gets condition type + /// + public AssertionConditionType ConditionType + { + get { return myConditionType; } + } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionType.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionType.cs new file mode 100644 index 0000000..ecca4a5 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionConditionType.cs @@ -0,0 +1,77 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Specifies assertion type. If the assertion method argument satisifes the condition, then the execution continues. + /// Otherwise, execution is assumed to be halted + /// + enum AssertionConditionType + { + /// + /// Indicates that the marked parameter should be evaluated to true + /// + IS_TRUE = 0, + + /// + /// Indicates that the marked parameter should be evaluated to false + /// + IS_FALSE = 1, + + /// + /// Indicates that the marked parameter should be evaluated to null value + /// + IS_NULL = 2, + + /// + /// Indicates that the marked parameter should be evaluated to not null value + /// + IS_NOT_NULL = 3, + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionMethodAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionMethodAttribute.cs new file mode 100644 index 0000000..634164b --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/AssertionMethodAttribute.cs @@ -0,0 +1,60 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the marked method is assertion method, i.e. it halts control flow if one of the conditions is satisfied. + /// To set the condition, mark one of the parameters with attribute + /// + /// + [AttributeUsage (AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed partial class AssertionMethodAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/BaseTypeRequiredAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/BaseTypeRequiredAttribute.cs new file mode 100644 index 0000000..6785342 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/BaseTypeRequiredAttribute.cs @@ -0,0 +1,84 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// When applied to target attribute, specifies a requirement for any type which is marked with + /// target attribute to implement or inherit specific type or types + /// + /// + /// + /// [BaseTypeRequired(typeof(IComponent)] // Specify requirement + /// public class ComponentAttribute : Attribute + /// {} + /// + /// [Component] // ComponentAttribute requires implementing IComponent interface + /// public class MyComponent : IComponent + /// {} + /// + /// + [AttributeUsage (AttributeTargets.Class, AllowMultiple = true, Inherited = true)] + [BaseTypeRequired (typeof (Attribute))] + sealed partial class BaseTypeRequiredAttribute : Attribute + { + /// + /// Initializes new instance of BaseTypeRequiredAttribute + /// + /// Specifies which types are required + public BaseTypeRequiredAttribute (Type baseType) + { + BaseTypes = new[] { baseType }; + } + + /// + /// Gets enumerations of specified base types + /// + public Type[] BaseTypes { get; private set; } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CanBeNullAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CanBeNullAttribute.cs new file mode 100644 index 0000000..7bdc77b --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CanBeNullAttribute.cs @@ -0,0 +1,56 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the value of marked element could be null sometimes, so the check for null is necessary before its usage + /// + [AttributeUsage (AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Delegate | AttributeTargets.Field, AllowMultiple = false, Inherited = true)] + sealed partial class CanBeNullAttribute : Attribute { } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CannotApplyEqualityOperatorAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CannotApplyEqualityOperatorAttribute.cs new file mode 100644 index 0000000..538d5d0 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/CannotApplyEqualityOperatorAttribute.cs @@ -0,0 +1,57 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the value of marked type (or its derivatives) cannot be compared using '==' or '!=' operators. + /// There is only exception to compare with null, it is permitted + /// + [AttributeUsage (AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct, AllowMultiple = false, Inherited = true)] + sealed partial class CannotApplyEqualityOperatorAttribute : Attribute { } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ContractAnnotationAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ContractAnnotationAttribute.cs new file mode 100644 index 0000000..2b5b2bb --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ContractAnnotationAttribute.cs @@ -0,0 +1,94 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Describes dependency between method input and output + /// + /// + ///

Function definition table syntax:

+ /// + /// FDT ::= FDTRow [;FDTRow]* + /// FDTRow ::= Input => Output | Output <= Input + /// Input ::= ParameterName: Value [, Input]* + /// Output ::= [ParameterName: Value]* {halt|stop|void|nothing|Value} + /// Value ::= true | false | null | notnull | canbenull + /// + /// If method has single input parameter, it's name could be omitted.
+ /// Using "halt" (or "void"/"nothing", which is the same) for method output means that methos doesn't return normally.
+ /// "canbenull" annotation is only applicable for output parameters.
+ /// You can use multiple [ContractAnnotation] for each FDT row, or use single attribute with rows separated by semicolon.
+ ///
+ /// + /// + /// [ContractAnnotation("=> halt")] public void TerminationMethod() + /// [ContractAnnotation("halt <= condition: false")] public void Assert(bool condition, string text) // Regular Assertion method + /// [ContractAnnotation("s:null => true")] public bool IsNullOrEmpty(string s) // String.IsNullOrEmpty + /// [ContractAnnotation("null => null; notnull => notnull")] public object Transform(object data) // Method which returns null if parameter is null, and not null if parameter is not null + /// [ContractAnnotation("s:null=>false; =>true,result:notnull; =>false, result:null")] public bool TryParse(string s, out Person result) + /// + /// + [AttributeUsage (AttributeTargets.Method, AllowMultiple = true, Inherited = true)] + sealed partial class ContractAnnotationAttribute : Attribute + { + public ContractAnnotationAttribute ([NotNull] string fdt) + : this (fdt, false) + { + } + + public ContractAnnotationAttribute ([NotNull] string fdt, bool forceFullStates) + { + FDT = fdt; + ForceFullStates = forceFullStates; + } + + public string FDT { get; private set; } + public bool ForceFullStates { get; private set; } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseKindFlags.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseKindFlags.cs new file mode 100644 index 0000000..a38ccf5 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseKindFlags.cs @@ -0,0 +1,77 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + [Flags] + enum ImplicitUseKindFlags + { + Default = Access | Assign | InstantiatedWithFixedConstructorSignature, + + /// + /// Only entity marked with attribute considered used + /// + Access = 1, + + /// + /// Indicates implicit assignment to a member + /// + Assign = 2, + + /// + /// Indicates implicit instantiation of a type with fixed constructor signature. + /// That means any unused constructor parameters won't be reported as such. + /// + InstantiatedWithFixedConstructorSignature = 4, + + /// + /// Indicates implicit instantiation of a type + /// + InstantiatedNoFixedConstructorSignature = 8, + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseTargetFlags.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseTargetFlags.cs new file mode 100644 index 0000000..488dcee --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ImplicitUseTargetFlags.cs @@ -0,0 +1,71 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Specify what is considered used implicitly when marked with or + /// + [Flags] + enum ImplicitUseTargetFlags + { + Default = Itself, + + Itself = 1, + + /// + /// Members of entity marked with attribute are considered used + /// + Members = 2, + + /// + /// Entity marked with attribute and all its members considered used + /// + WithMembers = Itself | Members + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InstantHandleAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InstantHandleAttribute.cs new file mode 100644 index 0000000..336009c --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InstantHandleAttribute.cs @@ -0,0 +1,58 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Tells code analysis engine if the parameter is completely handled when the invoked method is on stack. + /// If the parameter is delegate, indicates that delegate is executed while the method is executed. + /// If the parameter is enumerable, indicates that it is enumerated while the method is executed. + /// + [AttributeUsage (AttributeTargets.Parameter, Inherited = true)] + sealed partial class InstantHandleAttribute : Attribute { } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InvokerParameterNameAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InvokerParameterNameAttribute.cs new file mode 100644 index 0000000..0813727 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/InvokerParameterNameAttribute.cs @@ -0,0 +1,57 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the function argument should be string literal and match one of the parameters of the caller function. + /// For example, has such parameter. + /// + [AttributeUsage (AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)] + sealed partial class InvokerParameterNameAttribute : Attribute { } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LinqTunnelAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LinqTunnelAttribute.cs new file mode 100644 index 0000000..dd78daf --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LinqTunnelAttribute.cs @@ -0,0 +1,58 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that method is *pure* linq method, with postponed enumeration. C# iterator methods (yield ...) are always LinqTunnel. + /// + [AttributeUsage (AttributeTargets.Method)] + sealed partial class LinqTunnelAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LocalizationRequiredAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LocalizationRequiredAttribute.cs new file mode 100644 index 0000000..0cb9896 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/LocalizationRequiredAttribute.cs @@ -0,0 +1,103 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that marked element should be localized or not. + /// + [AttributeUsage (AttributeTargets.All, AllowMultiple = false, Inherited = true)] + sealed partial class LocalizationRequiredAttribute : Attribute + { + /// + /// Initializes a new instance of the class with + /// set to . + /// + public LocalizationRequiredAttribute () + : this (true) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// true if a element should be localized; otherwise, false. + public LocalizationRequiredAttribute (bool required) + { + Required = required; + } + + /// + /// Gets a value indicating whether a element should be localized. + /// true if a element should be localized; otherwise, false. + /// + public bool Required { get; private set; } + + /// + /// Returns whether the value of the given object is equal to the current . + /// + /// The object to test the value equality of. + /// + /// true if the value of the given object is equal to that of the current; otherwise, false. + /// + public override bool Equals (object obj) + { + var attribute = obj as LocalizationRequiredAttribute; + return attribute != null && attribute.Required == Required; + } + + /// + /// Returns the hash code for this instance. + /// + /// A hash code for the current . + public override int GetHashCode () + { + return base.GetHashCode (); + } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/MeansImplicitUseAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/MeansImplicitUseAttribute.cs new file mode 100644 index 0000000..0607452 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/MeansImplicitUseAttribute.cs @@ -0,0 +1,81 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Should be used on attributes and causes ReSharper to not mark symbols marked with such attributes as unused (as well as by other usage inspections) + /// + [AttributeUsage (AttributeTargets.Class, AllowMultiple = false, Inherited = true)] + sealed partial class MeansImplicitUseAttribute : Attribute + { + public MeansImplicitUseAttribute () + : this (ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default) { } + + public MeansImplicitUseAttribute (ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags) + { + UseKindFlags = useKindFlags; + TargetFlags = targetFlags; + } + + public MeansImplicitUseAttribute (ImplicitUseKindFlags useKindFlags) + : this (useKindFlags, ImplicitUseTargetFlags.Default) + { + } + + public MeansImplicitUseAttribute (ImplicitUseTargetFlags targetFlags) + : this (ImplicitUseKindFlags.Default, targetFlags) { } + + public ImplicitUseKindFlags UseKindFlags { get; private set; } + + /// + /// Gets value indicating what is meant to be used + /// + public ImplicitUseTargetFlags TargetFlags { get; private set; } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NoEnumerationAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NoEnumerationAttribute.cs new file mode 100644 index 0000000..6715a51 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NoEnumerationAttribute.cs @@ -0,0 +1,59 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that IEnumarable, passed as parameter, is not enumerated. + /// + /// + [AttributeUsage(AttributeTargets.Parameter)] + sealed partial class NoEnumerationAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotNullAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotNullAttribute.cs new file mode 100644 index 0000000..5dc6ee3 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotNullAttribute.cs @@ -0,0 +1,56 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the value of marked element could never be null + /// + [AttributeUsage (AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Delegate | AttributeTargets.Field, AllowMultiple = false, Inherited = true)] + sealed partial class NotNullAttribute : Attribute { } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotifyPropertyChangedInvocatorAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotifyPropertyChangedInvocatorAttribute.cs new file mode 100644 index 0000000..3f4989c --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/NotifyPropertyChangedInvocatorAttribute.cs @@ -0,0 +1,65 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the function is used to notify class type property value is changed. + /// + [AttributeUsage (AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed partial class NotifyPropertyChangedInvocatorAttribute : Attribute + { + public NotifyPropertyChangedInvocatorAttribute () { } + public NotifyPropertyChangedInvocatorAttribute (string parameterName) + { + ParameterName = parameterName; + } + + public string ParameterName { get; private set; } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PathReferenceAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PathReferenceAttribute.cs new file mode 100644 index 0000000..1d74ef4 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PathReferenceAttribute.cs @@ -0,0 +1,63 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + [AttributeUsage (AttributeTargets.Parameter)] + sealed partial class PathReferenceAttribute : Attribute + { + public PathReferenceAttribute () { } + + public PathReferenceAttribute ([PathReference] string basePath) + { + BasePath = basePath; + } + + public string BasePath { get; private set; } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PublicAPIAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PublicAPIAttribute.cs new file mode 100644 index 0000000..a0c301e --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PublicAPIAttribute.cs @@ -0,0 +1,60 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// This attribute is intended to mark publicly available API which should not be removed and so is treated as used. + /// + [MeansImplicitUse] + sealed partial class PublicAPIAttribute : Attribute + { + public PublicAPIAttribute () { } + public PublicAPIAttribute (string comment) { } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PureAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PureAttribute.cs new file mode 100644 index 0000000..eb97791 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/PureAttribute.cs @@ -0,0 +1,57 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that method doesn't contain observable side effects. + /// + // The same as + [AttributeUsage (AttributeTargets.Method, Inherited = true)] + sealed partial class PureAttribute : Attribute { } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ReSharperAnnotations Apache-2.0.licenseheader b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ReSharperAnnotations Apache-2.0.licenseheader new file mode 100644 index 0000000..bb94229 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/ReSharperAnnotations Apache-2.0.licenseheader @@ -0,0 +1,37 @@ +extensions: .cs +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/StringFormatMethodAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/StringFormatMethodAttribute.cs new file mode 100644 index 0000000..b3d3223 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/StringFormatMethodAttribute.cs @@ -0,0 +1,73 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that marked method builds string by format pattern and (optional) arguments. + /// Parameter, which contains format string, should be given in constructor. + /// The format string should be in -like form + /// + [AttributeUsage (AttributeTargets.Constructor | AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed partial class StringFormatMethodAttribute : Attribute + { + /// + /// Initializes new instance of StringFormatMethodAttribute + /// + /// Specifies which parameter of an annotated method should be treated as format-string + public StringFormatMethodAttribute (string formatParameterName) + { + FormatParameterName = formatParameterName; + } + + /// + /// Gets format parameter name + /// + public string FormatParameterName { get; private set; } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/TerminatesProgramAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/TerminatesProgramAttribute.cs new file mode 100644 index 0000000..2a3d47f --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/TerminatesProgramAttribute.cs @@ -0,0 +1,59 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the marked method unconditionally terminates control flow execution. + /// For example, it could unconditionally throw exception + /// + [AttributeUsage (AttributeTargets.Method, AllowMultiple = false, Inherited = true)] + sealed partial class TerminatesProgramAttribute : Attribute + { + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/UsedImplicitlyAttribute.cs b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/UsedImplicitlyAttribute.cs new file mode 100644 index 0000000..61498df --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.JetBrains.Annotations.Sources.1.15.23.0/UsedImplicitlyAttribute.cs @@ -0,0 +1,86 @@ +// NOTE: This file was originally generated via JetBrains ReSharper +// and is part of the JetBrains.Annoations for ReSharper. +// It has since been modified for use in the re-motion framework development. +// +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +// Orignal license header by JetBrains: +// +// Copyright 2007-2012 JetBrains s.r.o. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +using System; + +#pragma warning disable 1591 +// ReSharper disable UnusedMember.Global +// ReSharper disable MemberCanBePrivate.Global +// ReSharper disable UnusedAutoPropertyAccessor.Global +// ReSharper disable IntroduceOptionalParameters.Global +// ReSharper disable MemberCanBeProtected.Global +// ReSharper disable InconsistentNaming +// ReSharper disable once CheckNamespace + +namespace JetBrains.Annotations +{ + /// + /// Indicates that the marked symbol is used implicitly (e.g. via reflection, in external library), + /// so this symbol will not be marked as unused (as well as by other usage inspections) + /// + [AttributeUsage (AttributeTargets.All, AllowMultiple = false, Inherited = true)] + sealed partial class UsedImplicitlyAttribute : Attribute + { + [UsedImplicitly] + public UsedImplicitlyAttribute () + : this (ImplicitUseKindFlags.Default, ImplicitUseTargetFlags.Default) { } + + [UsedImplicitly] + public UsedImplicitlyAttribute (ImplicitUseKindFlags useKindFlags, ImplicitUseTargetFlags targetFlags) + { + UseKindFlags = useKindFlags; + TargetFlags = targetFlags; + } + + [UsedImplicitly] + public UsedImplicitlyAttribute (ImplicitUseKindFlags useKindFlags) + : this (useKindFlags, ImplicitUseTargetFlags.Default) { } + + [UsedImplicitly] + public UsedImplicitlyAttribute (ImplicitUseTargetFlags targetFlags) + : this (ImplicitUseKindFlags.Default, targetFlags) { } + + [UsedImplicitly] + public ImplicitUseKindFlags UseKindFlags { get; private set; } + + /// + /// Gets value indicating what is meant to be used + /// + [UsedImplicitly] + public ImplicitUseTargetFlags TargetFlags { get; private set; } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/ArgumentUtility.cs b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/ArgumentUtility.cs new file mode 100644 index 0000000..2753398 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/ArgumentUtility.cs @@ -0,0 +1,447 @@ +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +using System; +using System.Collections; +using System.Diagnostics; +using System.Reflection; +using JetBrains.Annotations; + +// ReSharper disable once CheckNamespace +namespace Remotion.Utilities +{ + /// + /// This utility class provides methods for checking arguments. + /// + /// + /// Some methods of this class return the value of the parameter. In some cases, this is useful because the value will be converted to another + /// type: + /// ("o", o); + /// } + /// ]]> + /// In some other cases, the input value is returned unmodified. This makes it easier to use the argument checks in calls to base class constructors + /// or property setters: + /// + /// + static partial class ArgumentUtility + { + [AssertionMethod] + public static T CheckNotNull ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] T actualValue) + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (actualValue == null) + // ReSharper restore CompareNonConstrainedGenericWithNull + throw new ArgumentNullException (argumentName); + + return actualValue; + } + + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckNotNull ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] T actualValue) + { + CheckNotNull (argumentName, actualValue); + } + + [AssertionMethod] + public static string CheckNotNullOrEmpty ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] string actualValue) + { + CheckNotNull (argumentName, actualValue); + if (actualValue.Length == 0) + throw CreateArgumentEmptyException (argumentName); + + return actualValue; + } + + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckNotNullOrEmpty ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] string actualValue) + { + CheckNotNullOrEmpty (argumentName, actualValue); + } + + [AssertionMethod] + public static T CheckNotNullOrEmpty ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T enumerable) + where T: IEnumerable + { + CheckNotNull (argumentName, enumerable); + CheckNotEmpty (argumentName, enumerable); + + return enumerable; + } + + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckNotNullOrEmpty ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T enumerable) + where T: IEnumerable + { + CheckNotNullOrEmpty (argumentName, enumerable); + } + + [AssertionMethod] + public static T CheckNotNullOrItemsNull ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T enumerable) + where T: IEnumerable + { + CheckNotNull (argumentName, enumerable); + + int i = 0; + foreach (object item in enumerable) + { + if (item == null) + throw CreateArgumentItemNullException (argumentName, i); + ++i; + } + + return enumerable; + } + + [AssertionMethod] + public static T CheckNotNullOrEmptyOrItemsNull ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] T enumerable) + where T: IEnumerable + { + CheckNotNullOrItemsNull (argumentName, enumerable); + CheckNotEmpty (argumentName, enumerable); + + return enumerable; + } + + [AssertionMethod] + public static string CheckNotEmpty ([InvokerParameterName] string argumentName, string actualValue) + { + if (actualValue != null && actualValue.Length == 0) + throw CreateArgumentEmptyException (argumentName); + + return actualValue; + } + + [AssertionMethod] + public static T CheckNotEmpty ([InvokerParameterName] string argumentName, T enumerable) + where T: IEnumerable + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (enumerable != null) + // ReSharper restore CompareNonConstrainedGenericWithNull + { + var collection = enumerable as ICollection; + if (collection != null) + { + if (collection.Count == 0) + throw CreateArgumentEmptyException (argumentName); + else + return enumerable; + } + + IEnumerator enumerator = enumerable.GetEnumerator(); + var disposableEnumerator = enumerator as IDisposable; + using (disposableEnumerator) // using (null) is allowed in C# + { + if (!enumerator.MoveNext()) + throw CreateArgumentEmptyException (argumentName); + } + } + + return enumerable; + } + + [AssertionMethod] + public static Guid CheckNotEmpty ([InvokerParameterName] string argumentName, Guid actualValue) + { + if (actualValue == Guid.Empty) + throw CreateArgumentEmptyException (argumentName); + + return actualValue; + } + + public static object CheckNotNullAndType ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] object actualValue, + Type expectedType) + { + if (actualValue == null) + throw new ArgumentNullException (argumentName); + + // ReSharper disable UseMethodIsInstanceOfType + if (!expectedType.GetTypeInfo().IsAssignableFrom (actualValue.GetType().GetTypeInfo())) + throw CreateArgumentTypeException (argumentName, actualValue.GetType(), expectedType); + // ReSharper restore UseMethodIsInstanceOfType + + return actualValue; + } + + ///// Returns the value itself if it is not and of the specified value type. + ///// The type that must have. + ///// is . + ///// is an instance of another type (which is not a subclass of ). + //public static TExpected CheckNotNullAndType (string argumentName, object actualValue) + // where TExpected: class + //{ + // if (actualValue == null) + // throw new ArgumentNullException (argumentName); + // return CheckType (argumentName, actualValue); + //} + + /// Returns the value itself if it is not and of the specified value type. + /// The type that must have. + /// The is a . + /// The is an instance of another type. + public static TExpected CheckNotNullAndType ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] object actualValue) + // where TExpected: struct + { + if (actualValue == null) + throw new ArgumentNullException (argumentName); + + if (! (actualValue is TExpected)) + throw CreateArgumentTypeException (argumentName, actualValue.GetType(), typeof (TExpected)); + return (TExpected) actualValue; + } + + /// Checks of the is of the . + /// The is a . + /// The is an instance of another type. + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckNotNullAndType ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] [NoEnumeration] object actualValue, + Type expectedType) + { + CheckNotNullAndType (argumentName, actualValue, expectedType); + } + + public static object CheckType ([InvokerParameterName] string argumentName, [NoEnumeration] object actualValue, Type expectedType) + { + if (actualValue == null) + { + if (NullableTypeUtility.IsNullableType_NoArgumentCheck (expectedType)) + return null; + else + throw CreateArgumentTypeException (argumentName, null, expectedType); + } + + // ReSharper disable UseMethodIsInstanceOfType + if (!expectedType.GetTypeInfo().IsAssignableFrom (actualValue.GetType().GetTypeInfo())) + throw CreateArgumentTypeException (argumentName, actualValue.GetType(), expectedType); + // ReSharper restore UseMethodIsInstanceOfType + + return actualValue; + } + + /// Returns the value itself if it is of the specified type. + /// The type that must have. + /// + /// is an instance of another type (which is not a subtype of ). + /// + /// is null and cannot be null. + /// + /// For non-nullable value types, you should use either or pass the type + /// instead. + /// + public static TExpected CheckType ([InvokerParameterName] string argumentName, [NoEnumeration] object actualValue) + { + if (actualValue == null) + { + try + { + return (TExpected) actualValue; + } + catch (NullReferenceException) + { + throw new ArgumentNullException (argumentName); + } + } + + if (!(actualValue is TExpected)) + throw CreateArgumentTypeException (argumentName, actualValue.GetType(), typeof (TExpected)); + + return (TExpected) actualValue; + } + + + /// Checks whether is not and can be assigned to . + /// The is . + /// The cannot be assigned to . + public static Type CheckNotNullAndTypeIsAssignableFrom ( + [InvokerParameterName] string argumentName, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] Type actualType, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] Type expectedType) + { + if (actualType == null) + throw new ArgumentNullException (argumentName); + return CheckTypeIsAssignableFrom (argumentName, actualType, expectedType); + } + + /// Checks whether can be assigned to . + /// The cannot be assigned to . + public static Type CheckTypeIsAssignableFrom ( + [InvokerParameterName] string argumentName, + Type actualType, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] Type expectedType) + { + CheckNotNull ("expectedType", expectedType); + if (actualType != null) + { + if (!expectedType.GetTypeInfo().IsAssignableFrom (actualType.GetTypeInfo())) + { + string message = string.Format ( + "Parameter '{0}' is a '{2}', which cannot be assigned to type '{1}'.", + argumentName, + expectedType, + actualType); + throw new ArgumentException (message, argumentName); + } + } + + return actualType; + } + + /// Checks whether can be assigned to . + /// The cannot be assigned to . + [Conditional ("DEBUG")] + [AssertionMethod] + public static void DebugCheckTypeIsAssignableFrom ( + [InvokerParameterName] string argumentName, + Type actualType, + [AssertionCondition (AssertionConditionType.IS_NOT_NULL)] Type expectedType) + { + CheckTypeIsAssignableFrom (argumentName, actualType, expectedType); + } + + /// Checks whether all items in are of type or a null reference. + /// If at least one element is not of the specified type or a derived type. + public static T CheckItemsType ([InvokerParameterName] string argumentName, T collection, Type itemType) + where T: ICollection + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (collection != null) + // ReSharper restore CompareNonConstrainedGenericWithNull + { + int index = 0; + foreach (object item in collection) + { + // ReSharper disable UseMethodIsInstanceOfType + if (item != null && !itemType.GetTypeInfo().IsAssignableFrom (item.GetType().GetTypeInfo())) + throw CreateArgumentItemTypeException (argumentName, index, itemType, item.GetType()); + // ReSharper restore UseMethodIsInstanceOfType + + ++index; + } + } + + return collection; + } + + /// Checks whether all items in are of type and not null references. + /// If at least one element is not of the specified type or a derived type. + /// If at least one element is a null reference. + public static T CheckItemsNotNullAndType ([InvokerParameterName] string argumentName, T collection, Type itemType) + where T: ICollection + { + // ReSharper disable CompareNonConstrainedGenericWithNull + if (collection != null) + // ReSharper restore CompareNonConstrainedGenericWithNull + { + int index = 0; + foreach (object item in collection) + { + if (item == null) + throw CreateArgumentItemNullException (argumentName, index); + // ReSharper disable UseMethodIsInstanceOfType + if (!itemType.GetTypeInfo().IsAssignableFrom (item.GetType().GetTypeInfo())) + throw CreateArgumentItemTypeException (argumentName, index, itemType, item.GetType()); + // ReSharper restore UseMethodIsInstanceOfType + + ++index; + } + } + + return collection; + } + + public static ArgumentException CreateArgumentEmptyException ([InvokerParameterName] string argumentName) + { + return new ArgumentException (string.Format("Parameter '{0}' cannot be empty.", argumentName), argumentName); + } + + public static ArgumentException CreateArgumentTypeException ([InvokerParameterName] string argumentName, Type actualType, Type expectedType) + { + string actualTypeName = actualType != null ? actualType.ToString() : ""; + if (expectedType == null) + { + return new ArgumentException (string.Format ("Parameter '{0}' has unexpected type '{1}'.", argumentName, actualTypeName), argumentName); + } + else + { + return new ArgumentException ( + string.Format ("Parameter '{0}' has type '{2}' when type '{1}' was expected.", argumentName, expectedType, actualTypeName), + argumentName); + } + } + + public static ArgumentException CreateArgumentItemTypeException ( + [InvokerParameterName] string argumentName, + int index, + Type expectedType, + Type actualType) + { + return new ArgumentException ( + string.Format ( + "Item {0} of parameter '{1}' has the type '{2}' instead of '{3}'.", + index, + argumentName, + actualType, + expectedType), + argumentName); + } + + public static ArgumentNullException CreateArgumentItemNullException ([InvokerParameterName] string argumentName, int index) + { + return new ArgumentNullException (argumentName, string.Format ("Item {0} of parameter '{1}' is null.", index, argumentName)); + } + } +} \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader new file mode 100644 index 0000000..98e5ae2 Binary files /dev/null and b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ArgumentUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader differ diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ExceptionUtility.Sources.1.15.23.0/ExceptionUtility.cs b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ExceptionUtility.Sources.1.15.23.0/ExceptionUtility.cs new file mode 100644 index 0000000..c7a789e --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ExceptionUtility.Sources.1.15.23.0/ExceptionUtility.cs @@ -0,0 +1,47 @@ +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +using System; +using System.Reflection; + +// ReSharper disable once CheckNamespace +namespace Remotion.Utilities +{ + static partial class ExceptionUtility + { + private static readonly Lazy> s_internalPreserveStackTrace = new Lazy> (GetInternalPreserveStackTrace); + + public static Exception PreserveStackTrace (this Exception exception) + { + if (exception == null) + throw new ArgumentNullException ("exception"); + + // http://weblogs.asp.net/fmarguerie/archive/2008/01/02/rethrowing-exceptions-and-preserving-the-full-call-stack-trace.aspx + + s_internalPreserveStackTrace.Value (exception); + return exception; + } + + private static Action GetInternalPreserveStackTrace () + { + var methodInfo = typeof (Exception).GetMethod ("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); + if (methodInfo == null) + throw new InvalidOperationException ("Type 'System.Exception' does not contain method InternalPreserveStackTrace()."); + + return (Action) methodInfo.CreateDelegate (typeof (Action)); + } + } +} diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ExceptionUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ExceptionUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader new file mode 100644 index 0000000..505a480 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.ExceptionUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader @@ -0,0 +1,52 @@ +extensions: designer.cs +extensions: .cs +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +extensions: .xml + +extensions: .vb +' Copyright (c) rubicon IT GmbH, www.rubicon.eu +' +' See the NOTICE file distributed with this work for additional information +' regarding copyright ownership. rubicon licenses this file to you under +' the Apache License, Version 2.0 (the "License"); you may not use this +' file except in compliance with the License. You may obtain a copy of the +' License at +' +' http://www.apache.org/licenses/LICENSE-2.0 +' +' Unless required by applicable law or agreed to in writing, software +' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +' License for the specific language governing permissions and limitations +' under the License. +' \ No newline at end of file diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/NullableTypeUtility.cs b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/NullableTypeUtility.cs new file mode 100644 index 0000000..813216e --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/NullableTypeUtility.cs @@ -0,0 +1,67 @@ +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +using System; +using System.Reflection; + +// ReSharper disable once CheckNamespace +namespace Remotion.Utilities +{ + static partial class NullableTypeUtility + { + /// + /// Determines whether a type is nullable, ie. whether variables of it can be assigned . + /// + /// The type to check. + /// + /// true if is nullable; otherwise, false. + /// + /// + /// A type is nullable if it is a reference type or a nullable value type. This method returns false only for non-nullable value types. + /// + public static bool IsNullableType (Type type) + { + if (type == null) + throw new ArgumentNullException ("type"); + + return IsNullableType_NoArgumentCheck (type); + } + + internal static bool IsNullableType_NoArgumentCheck (Type expectedType) + { + return !expectedType.GetTypeInfo().IsValueType || Nullable.GetUnderlyingType (expectedType) != null; + } + + public static Type GetNullableType (Type type) + { + if (type == null) + throw new ArgumentNullException ("type"); + + if (IsNullableType (type)) + return type; + else + return typeof (Nullable<>).MakeGenericType (type); + } + + public static Type GetBasicType (Type type) + { + if (type == null) + throw new ArgumentNullException ("type"); + + return Nullable.GetUnderlyingType (type) ?? type; + } + } +} diff --git a/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader new file mode 100644 index 0000000..505a480 --- /dev/null +++ b/UnitTests.Net_4_5/App_Packages/Remotion.Utilities.NullableTypeUtility.Sources.1.15.23.0/SharedSource Apache-2.0.licenseheader @@ -0,0 +1,52 @@ +extensions: designer.cs +extensions: .cs +// Copyright (c) rubicon IT GmbH, www.rubicon.eu +// +// See the NOTICE file distributed with this work for additional information +// regarding copyright ownership. rubicon licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. You may obtain a copy of the +// License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. +// +extensions: .xml + +extensions: .vb +' Copyright (c) rubicon IT GmbH, www.rubicon.eu +' +' See the NOTICE file distributed with this work for additional information +' regarding copyright ownership. rubicon licenses this file to you under +' the Apache License, Version 2.0 (the "License"); you may not use this +' file except in compliance with the License. You may obtain a copy of the +' License at +' +' http://www.apache.org/licenses/LICENSE-2.0 +' +' Unless required by applicable law or agreed to in writing, software +' distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +' WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +' License for the specific language governing permissions and limitations +' under the License. +' \ No newline at end of file diff --git a/UnitTests.Net_4_5/UnitTests.Net_4_5.csproj b/UnitTests.Net_4_5/UnitTests.Net_4_5.csproj new file mode 100644 index 0000000..bfb7c4d --- /dev/null +++ b/UnitTests.Net_4_5/UnitTests.Net_4_5.csproj @@ -0,0 +1,189 @@ + + + + Local + 9.0.30729 + 2.0 + {888F6B38-E543-429D-BF47-B6DB380272B3} + Debug + AnyCPU + Remotion.Linq.EagerFetching.UnitTests + JScript + Grid + IE50 + false + Library + Properties + Remotion.Linq.EagerFetching.UnitTests + OnBuildSuccess + true + ..\remotion.snk + v4.5 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + 773f98fc + + + bin\Debug\ + false + 285212672 + false + + + TRACE;DEBUG + + + true + 4096 + false + + + false + false + false + true + 4 + full + prompt + AllRules.ruleset + + + bin\Release\ + false + 285212672 + false + + + TRACE; + + + false + 4096 + false + + + + + true + false + false + true + 4 + none + prompt + AllRules.ruleset + + + + + False + ..\packages\NUnit.2.6.3\lib\nunit.framework.dll + + + False + ..\packages\Remotion.Linq.2.0.0\lib\net45\Remotion.Linq.dll + + + False + ..\packages\Remotion.Linq.Development.2.0.0\lib\net45\Remotion.Linq.Development.dll + + + False + ..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll + + + System + + + 4.5 + + + + + Properties\AssemblyInfoShared.cs + + + Utilities\ReflectionUtility.cs + + + %(RecursiveDir)%(Filename)%(Extension) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LGPL.licenseheader + + + remotion.snk + + + + + + + + + + + + + + {8b8e1924-8200-49bf-b8b4-d97968a834d2} + Core.Net_4_5 + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/UnitTests.Net_4_5/packages.config b/UnitTests.Net_4_5/packages.config new file mode 100644 index 0000000..e5409cb --- /dev/null +++ b/UnitTests.Net_4_5/packages.config @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/UnitTests/UnitTests.csproj b/UnitTests/UnitTests.csproj index cccbbef..5099f17 100644 --- a/UnitTests/UnitTests.csproj +++ b/UnitTests/UnitTests.csproj @@ -106,13 +106,13 @@ ..\packages\NUnit.2.6.3\lib\nunit.framework.dll - + False - ..\packages\Remotion.Linq.2.0.0\lib\net45\Remotion.Linq.dll + ..\packages\Remotion.Linq.2.1.1\lib\net45\Remotion.Linq.dll - + False - ..\packages\Remotion.Linq.Development.2.0.0\lib\net45\Remotion.Linq.Development.dll + ..\packages\Remotion.Linq.Development.2.1.1\lib\net45\Remotion.Linq.Development.dll ..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll diff --git a/UnitTests/packages.config b/UnitTests/packages.config index 4563415..8026ec6 100644 --- a/UnitTests/packages.config +++ b/UnitTests/packages.config @@ -3,8 +3,8 @@ - - + + diff --git a/packages/repositories.config b/packages/repositories.config index 127d0e3..388cb1e 100644 --- a/packages/repositories.config +++ b/packages/repositories.config @@ -3,8 +3,10 @@ + + \ No newline at end of file