From 9d14746a806b4b28356f9482005d39b21c1ebe0e Mon Sep 17 00:00:00 2001 From: Steve Vermeulen Date: Tue, 11 Jul 2017 13:41:00 -0300 Subject: [PATCH] Fixes for non unity build --- .../Plugins/Zenject/Source/Usage/InjectOptionalAttribute.cs | 4 ++++ .../Assets/Plugins/Zenject/Source/Util/TypeAnalyzer.cs | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/UnityProject/Assets/Plugins/Zenject/Source/Usage/InjectOptionalAttribute.cs b/UnityProject/Assets/Plugins/Zenject/Source/Usage/InjectOptionalAttribute.cs index 6f9e6ec71..ec39cbf47 100644 --- a/UnityProject/Assets/Plugins/Zenject/Source/Usage/InjectOptionalAttribute.cs +++ b/UnityProject/Assets/Plugins/Zenject/Source/Usage/InjectOptionalAttribute.cs @@ -1,11 +1,15 @@ using System; +#if !NOT_UNITY3D using JetBrains.Annotations; +#endif namespace Zenject { [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)] +#if !NOT_UNITY3D [MeansImplicitUse] +#endif public class InjectOptionalAttribute : InjectAttributeBase { public InjectOptionalAttribute() diff --git a/UnityProject/Assets/Plugins/Zenject/Source/Util/TypeAnalyzer.cs b/UnityProject/Assets/Plugins/Zenject/Source/Util/TypeAnalyzer.cs index c85e1bfb8..3a409d60f 100644 --- a/UnityProject/Assets/Plugins/Zenject/Source/Util/TypeAnalyzer.cs +++ b/UnityProject/Assets/Plugins/Zenject/Source/Util/TypeAnalyzer.cs @@ -1,4 +1,3 @@ -using JetBrains.Annotations; using ModestTree; using System; using System.Collections.Generic; @@ -168,10 +167,9 @@ private static IEnumerable GetAllFields(Type t, BindingFlags flags) return t.GetFields(flags).Concat(GetAllFields(t.BaseType, flags)).Distinct(); } - [NotNull] private static Action GetOnlyPropertySetter( - [NotNull] Type parentType, - [NotNull] string propertyName) + Type parentType, + string propertyName) { Assert.That(parentType != null); Assert.That(!string.IsNullOrEmpty(propertyName));