From 79663ef90e606f89a4bc4bf0fcabc699a2f87e59 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Thu, 19 Jan 2017 22:19:59 -0800 Subject: [PATCH] Upgrade to RC.3 --- Razor.sln | 3 +- build/common.props | 15 +- global.json | 5 - makefile.shade | 2 +- shared/build.proj | 24 --- shared/sources.csproj | 29 +++ shared/sources.nuspec | 19 -- ...icrosoft.AspNetCore.Razor.Evolution.csproj | 11 +- .../__TemporarySources__/HashCodeCombiner.cs | 86 --------- .../Microsoft.AspNetCore.Razor.Runtime.csproj | 17 +- .../ClosedGenericMatcher.cs | 108 ----------- .../CopyOnWriteDictionary.cs | 157 ---------------- .../CopyOnWriteDictionaryHolder.cs | 168 ------------------ .../__TemporarySources__/HashCodeCombiner.cs | 86 --------- .../__TemporarySources__/TaskCache.cs | 25 --- .../__TemporarySources__/TaskCacheOfT.cs | 18 -- .../Microsoft.AspNetCore.Razor.csproj | 8 +- .../__TemporarySources__/HashCodeCombiner.cs | 86 --------- ...osoft.CodeAnalysis.Razor.Workspaces.csproj | 17 +- ...Microsoft.CodeAnalysis.Remote.Razor.csproj | 14 -- .../RazorPageGenerator.csproj | 4 - ...oft.AspNetCore.Razor.Evolution.Test.csproj | 10 +- ...osoft.AspNetCore.Razor.Runtime.Test.csproj | 12 +- .../Microsoft.AspNetCore.Razor.Test.csproj | 9 +- ....CodeAnalysis.Razor.Workspaces.Test.csproj | 19 +- ...VisualStudio.LanguageServices.Razor.csproj | 20 +-- 26 files changed, 71 insertions(+), 901 deletions(-) delete mode 100644 global.json delete mode 100644 shared/build.proj create mode 100644 shared/sources.csproj delete mode 100644 shared/sources.nuspec delete mode 100644 src/Microsoft.AspNetCore.Razor.Evolution/__TemporarySources__/HashCodeCombiner.cs delete mode 100644 src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/ClosedGenericMatcher.cs delete mode 100644 src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionary.cs delete mode 100644 src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionaryHolder.cs delete mode 100644 src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/HashCodeCombiner.cs delete mode 100644 src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCache.cs delete mode 100644 src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCacheOfT.cs delete mode 100644 src/Microsoft.AspNetCore.Razor/__TemporarySources__/HashCodeCombiner.cs diff --git a/Razor.sln b/Razor.sln index 6220037f1..faf6fef15 100644 --- a/Razor.sln +++ b/Razor.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26020.0 +VisualStudioVersion = 15.0.26118.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3C0D6505-79B3-49D0-B4C3-176F0F1836ED}" EndProject @@ -14,7 +14,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Razor. EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F8C12DD6-659D-405A-AA27-FB22AD92A010}" ProjectSection(SolutionItems) = preProject - global.json = global.json NuGet.config = NuGet.config EndProjectSection EndProject diff --git a/build/common.props b/build/common.props index 68774db1c..b15eb4416 100644 --- a/build/common.props +++ b/build/common.props @@ -1,4 +1,5 @@ - + + @@ -8,13 +9,17 @@ $(MSBuildThisFileDirectory)Key.snk true true - - - false + 1.2.0-* + 1.6.2-* + $(VersionSuffix)-$(BuildNumber) - + + + + + \ No newline at end of file diff --git a/global.json b/global.json deleted file mode 100644 index 1e3e060e8..000000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "1.0.0-preview4-004233" - } -} diff --git a/makefile.shade b/makefile.shade index bcd566d0d..e13b8b0a4 100644 --- a/makefile.shade +++ b/makefile.shade @@ -42,4 +42,4 @@ k-standard-goals } #pack-sources target='build-pack' - dotnet command='msbuild shared/build.proj /t:Pack /v:n' + dotnet command='msbuild shared/sources.csproj "/t:Restore;PackAll" /v:n' diff --git a/shared/build.proj b/shared/build.proj deleted file mode 100644 index 1631b44fa..000000000 --- a/shared/build.proj +++ /dev/null @@ -1,24 +0,0 @@ - - - - - $(MSBuildThisFileDirectory)..\artifacts\build - $(VersionPrefix) - $(Version)-$(VersionSuffix) - - - - - - - - - - - \ No newline at end of file diff --git a/shared/sources.csproj b/shared/sources.csproj new file mode 100644 index 000000000..a1ac516f7 --- /dev/null +++ b/shared/sources.csproj @@ -0,0 +1,29 @@ + + + + + + $(MSBuildThisFileDirectory)..\artifacts\build + $(MSBuildThisFileDirectory)\$(PackageId) + netstandard1.0 + false + $(PackageId) + false + contentFiles + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/shared/sources.nuspec b/shared/sources.nuspec deleted file mode 100644 index 0eb708b9b..000000000 --- a/shared/sources.nuspec +++ /dev/null @@ -1,19 +0,0 @@ - - - - $id$ - $version$ - Microsoft - Microsoft - false - $id$ - - - - - - - - - - \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.csproj b/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.csproj index b958fe535..ed080d8c7 100644 --- a/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.csproj +++ b/src/Microsoft.AspNetCore.Razor.Evolution/Microsoft.AspNetCore.Razor.Evolution.csproj @@ -11,16 +11,7 @@ - - - - - - - - - - + diff --git a/src/Microsoft.AspNetCore.Razor.Evolution/__TemporarySources__/HashCodeCombiner.cs b/src/Microsoft.AspNetCore.Razor.Evolution/__TemporarySources__/HashCodeCombiner.cs deleted file mode 100644 index 3cf41ff3f..000000000 --- a/src/Microsoft.AspNetCore.Razor.Evolution/__TemporarySources__/HashCodeCombiner.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - -// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 - -namespace Microsoft.Extensions.Internal -{ - internal struct HashCodeCombiner - { - private long _combinedHash64; - - public int CombinedHash - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get { return _combinedHash64.GetHashCode(); } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private HashCodeCombiner(long seed) - { - _combinedHash64 = seed; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(IEnumerable e) - { - if (e == null) - { - Add(0); - } - else - { - var count = 0; - foreach (object o in e) - { - Add(o); - count++; - } - Add(count); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static implicit operator int(HashCodeCombiner self) - { - return self.CombinedHash; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(int i) - { - _combinedHash64 = ((_combinedHash64 << 5) + _combinedHash64) ^ i; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(string s) - { - var hashCode = (s != null) ? s.GetHashCode() : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(object o) - { - var hashCode = (o != null) ? o.GetHashCode() : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(TValue value, IEqualityComparer comparer) - { - var hashCode = value != null ? comparer.GetHashCode(value) : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static HashCodeCombiner Start() - { - return new HashCodeCombiner(0x1505L); - } - } -} diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.csproj b/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.csproj index a5ada1b7a..312cf2dd8 100644 --- a/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.csproj +++ b/src/Microsoft.AspNetCore.Razor.Runtime/Microsoft.AspNetCore.Razor.Runtime.csproj @@ -3,7 +3,9 @@ - Runtime components for rendering Razor pages and implementing tag helpers. + Runtime components for rendering Razor pages and implementing tag helpers. + $(Summary) + Commonly used types: Microsoft.AspNetCore.Razor.TagHelpers.HtmlAttributeNameAttribute Microsoft.AspNetCore.Razor.TagHelpers.HtmlTargetElementAttribute @@ -15,22 +17,13 @@ Microsoft.AspNetCore.Razor.TagHelpers.ITagHelper aspnetcore;cshtml;razor;taghelper;taghelpers - - - - - - - - - - + diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/ClosedGenericMatcher.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/ClosedGenericMatcher.cs deleted file mode 100644 index b10fabde9..000000000 --- a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/ClosedGenericMatcher.cs +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Linq; -using System.Reflection; - -// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 - -namespace Microsoft.Extensions.Internal -{ - /// - /// Helper related to generic interface definitions and implementing classes. - /// - internal static class ClosedGenericMatcher - { - /// - /// Determine whether is or implements a closed generic - /// created from . - /// - /// The of interest. - /// The open generic to match. Usually an interface. - /// - /// The closed generic created from that - /// is or implements. null if the two s have no such - /// relationship. - /// - /// - /// This method will return if is - /// typeof(KeyValuePair{,}), and is - /// typeof(KeyValuePair{string, object}). - /// - public static Type ExtractGenericInterface(Type queryType, Type interfaceType) - { - if (queryType == null) - { - throw new ArgumentNullException(nameof(queryType)); - } - - if (interfaceType == null) - { - throw new ArgumentNullException(nameof(interfaceType)); - } - - if (IsGenericInstantiation(queryType, interfaceType)) - { - // queryType matches (i.e. is a closed generic type created from) the open generic type. - return queryType; - } - - // Otherwise check all interfaces the type implements for a match. - // - If multiple different generic instantiations exists, we want the most derived one. - // - If that doesn't break the tie, then we sort alphabetically so that it's deterministic. - // - // We do this by looking at interfaces on the type, and recursing to the base type - // if we don't find any matches. - return GetGenericInstantiation(queryType, interfaceType); - } - - private static bool IsGenericInstantiation(Type candidate, Type interfaceType) - { - return - candidate.GetTypeInfo().IsGenericType && - candidate.GetGenericTypeDefinition() == interfaceType; - } - - private static Type GetGenericInstantiation(Type queryType, Type interfaceType) - { - Type bestMatch = null; - var interfaces = queryType.GetInterfaces(); - foreach (var @interface in interfaces) - { - if (IsGenericInstantiation(@interface, interfaceType)) - { - if (bestMatch == null) - { - bestMatch = @interface; - } - else if (StringComparer.Ordinal.Compare(@interface.FullName, bestMatch.FullName) < 0) - { - bestMatch = @interface; - } - else - { - // There are two matches at this level of the class hierarchy, but @interface is after - // bestMatch in the sort order. - } - } - } - - if (bestMatch != null) - { - return bestMatch; - } - - // BaseType will be null for object and interfaces, which means we've reached 'bottom'. - var baseType = queryType?.GetTypeInfo().BaseType; - if (baseType == null) - { - return null; - } - else - { - return GetGenericInstantiation(baseType, interfaceType); - } - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionary.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionary.cs deleted file mode 100644 index f3bbef473..000000000 --- a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionary.cs +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections; -using System.Collections.Generic; - -// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 - -namespace Microsoft.Extensions.Internal -{ - internal class CopyOnWriteDictionary : IDictionary - { - private readonly IDictionary _sourceDictionary; - private readonly IEqualityComparer _comparer; - private IDictionary _innerDictionary; - - public CopyOnWriteDictionary( - IDictionary sourceDictionary, - IEqualityComparer comparer) - { - if (sourceDictionary == null) - { - throw new ArgumentNullException(nameof(sourceDictionary)); - } - - if (comparer == null) - { - throw new ArgumentNullException(nameof(comparer)); - } - - _sourceDictionary = sourceDictionary; - _comparer = comparer; - } - - private IDictionary ReadDictionary - { - get - { - return _innerDictionary ?? _sourceDictionary; - } - } - - private IDictionary WriteDictionary - { - get - { - if (_innerDictionary == null) - { - _innerDictionary = new Dictionary(_sourceDictionary, - _comparer); - } - - return _innerDictionary; - } - } - - public virtual ICollection Keys - { - get - { - return ReadDictionary.Keys; - } - } - - public virtual ICollection Values - { - get - { - return ReadDictionary.Values; - } - } - - public virtual int Count - { - get - { - return ReadDictionary.Count; - } - } - - public virtual bool IsReadOnly - { - get - { - return false; - } - } - - public virtual TValue this[TKey key] - { - get - { - return ReadDictionary[key]; - } - set - { - WriteDictionary[key] = value; - } - } - - public virtual bool ContainsKey(TKey key) - { - return ReadDictionary.ContainsKey(key); - } - - public virtual void Add(TKey key, TValue value) - { - WriteDictionary.Add(key, value); - } - - public virtual bool Remove(TKey key) - { - return WriteDictionary.Remove(key); - } - - public virtual bool TryGetValue(TKey key, out TValue value) - { - return ReadDictionary.TryGetValue(key, out value); - } - - public virtual void Add(KeyValuePair item) - { - WriteDictionary.Add(item); - } - - public virtual void Clear() - { - WriteDictionary.Clear(); - } - - public virtual bool Contains(KeyValuePair item) - { - return ReadDictionary.Contains(item); - } - - public virtual void CopyTo(KeyValuePair[] array, int arrayIndex) - { - ReadDictionary.CopyTo(array, arrayIndex); - } - - public bool Remove(KeyValuePair item) - { - return WriteDictionary.Remove(item); - } - - public virtual IEnumerator> GetEnumerator() - { - return ReadDictionary.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionaryHolder.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionaryHolder.cs deleted file mode 100644 index 891c89dbb..000000000 --- a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/CopyOnWriteDictionaryHolder.cs +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using System.Collections.Generic; - -// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 - -namespace Microsoft.Extensions.Internal -{ - internal struct CopyOnWriteDictionaryHolder - { - private readonly Dictionary _source; - private Dictionary _copy; - - public CopyOnWriteDictionaryHolder(Dictionary source) - { - if (source == null) - { - throw new ArgumentNullException(nameof(source)); - } - - _source = source; - _copy = null; - } - - public CopyOnWriteDictionaryHolder(CopyOnWriteDictionaryHolder source) - { - _source = source._copy ?? source._source; - _copy = null; - } - - public bool HasBeenCopied => _copy != null; - - public Dictionary ReadDictionary - { - get - { - if (_copy != null) - { - return _copy; - } - else if (_source != null) - { - return _source; - } - else - { - // Default-Constructor case - _copy = new Dictionary(); - return _copy; - } - } - } - - public Dictionary WriteDictionary - { - get - { - if (_copy == null && _source == null) - { - // Default-Constructor case - _copy = new Dictionary(); - } - else if (_copy == null) - { - _copy = new Dictionary(_source, _source.Comparer); - } - - return _copy; - } - } - - public Dictionary.KeyCollection Keys - { - get - { - return ReadDictionary.Keys; - } - } - - public Dictionary.ValueCollection Values - { - get - { - return ReadDictionary.Values; - } - } - - public int Count - { - get - { - return ReadDictionary.Count; - } - } - - public bool IsReadOnly - { - get - { - return false; - } - } - - public TValue this[TKey key] - { - get - { - return ReadDictionary[key]; - } - set - { - WriteDictionary[key] = value; - } - } - - public bool ContainsKey(TKey key) - { - return ReadDictionary.ContainsKey(key); - } - - public void Add(TKey key, TValue value) - { - WriteDictionary.Add(key, value); - } - - public bool Remove(TKey key) - { - return WriteDictionary.Remove(key); - } - - public bool TryGetValue(TKey key, out TValue value) - { - return ReadDictionary.TryGetValue(key, out value); - } - - public void Add(KeyValuePair item) - { - ((ICollection>)WriteDictionary).Add(item); - } - - public void Clear() - { - WriteDictionary.Clear(); - } - - public bool Contains(KeyValuePair item) - { - return ((ICollection>)ReadDictionary).Contains(item); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - ((ICollection>)ReadDictionary).CopyTo(array, arrayIndex); - } - - public bool Remove(KeyValuePair item) - { - return ((ICollection>)WriteDictionary).Remove(item); - } - - public Dictionary.Enumerator GetEnumerator() - { - return ReadDictionary.GetEnumerator(); - } - } -} diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/HashCodeCombiner.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/HashCodeCombiner.cs deleted file mode 100644 index 3cf41ff3f..000000000 --- a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/HashCodeCombiner.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - -// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 - -namespace Microsoft.Extensions.Internal -{ - internal struct HashCodeCombiner - { - private long _combinedHash64; - - public int CombinedHash - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get { return _combinedHash64.GetHashCode(); } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private HashCodeCombiner(long seed) - { - _combinedHash64 = seed; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(IEnumerable e) - { - if (e == null) - { - Add(0); - } - else - { - var count = 0; - foreach (object o in e) - { - Add(o); - count++; - } - Add(count); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static implicit operator int(HashCodeCombiner self) - { - return self.CombinedHash; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(int i) - { - _combinedHash64 = ((_combinedHash64 << 5) + _combinedHash64) ^ i; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(string s) - { - var hashCode = (s != null) ? s.GetHashCode() : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(object o) - { - var hashCode = (o != null) ? o.GetHashCode() : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(TValue value, IEqualityComparer comparer) - { - var hashCode = value != null ? comparer.GetHashCode(value) : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static HashCodeCombiner Start() - { - return new HashCodeCombiner(0x1505L); - } - } -} diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCache.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCache.cs deleted file mode 100644 index 9c6fdeb49..000000000 --- a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCache.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; - -// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 - -namespace Microsoft.Extensions.Internal -{ - internal static class TaskCache - { - /// - /// A that's already completed successfully. - /// - /// - /// We're caching this in a static readonly field to make it more inlinable and avoid the volatile lookup done - /// by Task.CompletedTask. - /// -#if NET451 - public static readonly Task CompletedTask = Task.FromResult(0); -#else - public static readonly Task CompletedTask = Task.CompletedTask; -#endif - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCacheOfT.cs b/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCacheOfT.cs deleted file mode 100644 index 1abf64b91..000000000 --- a/src/Microsoft.AspNetCore.Razor.Runtime/__TemporarySources__/TaskCacheOfT.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Threading.Tasks; - -// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 - -namespace Microsoft.Extensions.Internal -{ - internal static class TaskCache - { - /// - /// Gets a completed with the value of default(T). - /// - public static Task DefaultCompletedTask { get; } = Task.FromResult(default(T)); - } - -} \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.csproj b/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.csproj index 99dc6d4cd..e6a837a54 100644 --- a/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.csproj +++ b/src/Microsoft.AspNetCore.Razor/Microsoft.AspNetCore.Razor.csproj @@ -11,13 +11,7 @@ - - - - - - - + diff --git a/src/Microsoft.AspNetCore.Razor/__TemporarySources__/HashCodeCombiner.cs b/src/Microsoft.AspNetCore.Razor/__TemporarySources__/HashCodeCombiner.cs deleted file mode 100644 index 3cf41ff3f..000000000 --- a/src/Microsoft.AspNetCore.Razor/__TemporarySources__/HashCodeCombiner.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System.Collections; -using System.Collections.Generic; -using System.Runtime.CompilerServices; - -// TODO remove this file and use sources packages https://github.com/aspnet/Common/issues/180 - -namespace Microsoft.Extensions.Internal -{ - internal struct HashCodeCombiner - { - private long _combinedHash64; - - public int CombinedHash - { - [MethodImpl(MethodImplOptions.AggressiveInlining)] - get { return _combinedHash64.GetHashCode(); } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private HashCodeCombiner(long seed) - { - _combinedHash64 = seed; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(IEnumerable e) - { - if (e == null) - { - Add(0); - } - else - { - var count = 0; - foreach (object o in e) - { - Add(o); - count++; - } - Add(count); - } - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static implicit operator int(HashCodeCombiner self) - { - return self.CombinedHash; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(int i) - { - _combinedHash64 = ((_combinedHash64 << 5) + _combinedHash64) ^ i; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(string s) - { - var hashCode = (s != null) ? s.GetHashCode() : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(object o) - { - var hashCode = (o != null) ? o.GetHashCode() : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Add(TValue value, IEqualityComparer comparer) - { - var hashCode = value != null ? comparer.GetHashCode(value) : 0; - Add(hashCode); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static HashCodeCombiner Start() - { - return new HashCodeCombiner(0x1505L); - } - } -} diff --git a/src/Microsoft.CodeAnalysis.Razor.Workspaces/Microsoft.CodeAnalysis.Razor.Workspaces.csproj b/src/Microsoft.CodeAnalysis.Razor.Workspaces/Microsoft.CodeAnalysis.Razor.Workspaces.csproj index 92b13d0e0..83e776108 100644 --- a/src/Microsoft.CodeAnalysis.Razor.Workspaces/Microsoft.CodeAnalysis.Razor.Workspaces.csproj +++ b/src/Microsoft.CodeAnalysis.Razor.Workspaces/Microsoft.CodeAnalysis.Razor.Workspaces.csproj @@ -1,28 +1,19 @@ + + Razor is a markup syntax for adding server-side logic to web pages. This package contains the Razor design-time infrastructure. net451;netstandard1.3 $(NoWarn);CS1591 true aspnetcore;cshtml;razor - - - - - - $(PackageTargetFallback);portable-net45+win8+wp8+wpa81; - - - - + - - - + \ No newline at end of file diff --git a/src/Microsoft.CodeAnalysis.Remote.Razor/Microsoft.CodeAnalysis.Remote.Razor.csproj b/src/Microsoft.CodeAnalysis.Remote.Razor/Microsoft.CodeAnalysis.Remote.Razor.csproj index 231bd5b14..ee883a877 100644 --- a/src/Microsoft.CodeAnalysis.Remote.Razor/Microsoft.CodeAnalysis.Remote.Razor.csproj +++ b/src/Microsoft.CodeAnalysis.Remote.Razor/Microsoft.CodeAnalysis.Remote.Razor.csproj @@ -6,26 +6,12 @@ $(NoWarn);CS1591 true aspnetcore;cshtml;razor - - Microsoft.CodeAnalysis.Remote.Razor - - - - - - $(PackageTargetFallback);portable-net45+win8+wp8+wpa81; - - - - - - diff --git a/src/RazorPageGenerator/RazorPageGenerator.csproj b/src/RazorPageGenerator/RazorPageGenerator.csproj index 211703aa3..82e086681 100644 --- a/src/RazorPageGenerator/RazorPageGenerator.csproj +++ b/src/RazorPageGenerator/RazorPageGenerator.csproj @@ -14,8 +14,4 @@ - - - - diff --git a/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj b/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj index 66ee7fefa..57199fc88 100644 --- a/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj +++ b/test/Microsoft.AspNetCore.Razor.Evolution.Test/Microsoft.AspNetCore.Razor.Evolution.Test.csproj @@ -3,23 +3,17 @@ netcoreapp1.1;net451 $(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES + $(DefaultItemExcludes);TestFiles\**\* - - - - - + - - - \ No newline at end of file diff --git a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj index 285825fe4..e0f4ff0fe 100644 --- a/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj +++ b/test/Microsoft.AspNetCore.Razor.Runtime.Test/Microsoft.AspNetCore.Razor.Runtime.Test.csproj @@ -4,23 +4,16 @@ netcoreapp1.1;net451 + $(DefaultItemExcludes);TestFiles\**\* - - - - true - - - - - + @@ -29,7 +22,6 @@ - diff --git a/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj b/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj index 7f829fd4f..c23c4df6f 100644 --- a/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj +++ b/test/Microsoft.AspNetCore.Razor.Test/Microsoft.AspNetCore.Razor.Test.csproj @@ -5,22 +5,18 @@ netcoreapp1.1;net451 $(DefineConstants);__RemoveThisBitTo__GENERATE_BASELINES + $(DefaultItemExcludes);TestFiles\**\* - - - - - - + @@ -29,7 +25,6 @@ - diff --git a/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj b/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj index 0025e370d..c33bcec6c 100644 --- a/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj +++ b/test/Microsoft.CodeAnalysis.Razor.Workspaces.Test/Microsoft.CodeAnalysis.Razor.Workspaces.Test.csproj @@ -1,34 +1,31 @@ + + true $(NoWarn);CS1591 netcoreapp1.1;net451 + $(DefaultItemExcludes);TestFiles\**\* + $(PackageTargetFallback);portable-net45+win8+wp8+wpa81; + - - + - - - + - - - - - - + \ No newline at end of file diff --git a/tooling/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj b/tooling/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj index 54f392f89..d7f498de0 100644 --- a/tooling/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj +++ b/tooling/Microsoft.VisualStudio.LanguageServices.Razor/Microsoft.VisualStudio.LanguageServices.Razor.csproj @@ -1,31 +1,21 @@  + + net46 $(NoWarn);CS1591 true - - - Microsoft.VisualStudio.LanguageServices.Razor - - - - - - $(PackageTargetFallback);portable-net45+win8+wp8+wpa81; + Microsoft.VisualStudio.LanguageServices.Razor - - - - + - - + \ No newline at end of file