Skip to content

Commit

Permalink
Replaced NETCOREAPP symbol with NETCORE defined in Directory.Build.ta…
Browse files Browse the repository at this point in the history
…rgets
  • Loading branch information
mjuen committed Aug 13, 2019
1 parent 3f2ba0f commit df87ada
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Caliburn.Micro.Platform/ActionMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ void ElementLoaded(object sender, RoutedEventArgs e) {
}
else currentElement = context.View;

#if NET || NETCOREAPP
#if NET || NETCORE
var binding = new Binding {
Path = new PropertyPath(Message.HandlerProperty),
Source = currentElement
Expand Down
2 changes: 1 addition & 1 deletion src/Caliburn.Micro.Platform/Bind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void ModelWithoutContextChanged(DependencyObject d, DependencyPropertyCha
/// </summary>
/// <param name="dependencyObject">The ui to apply conventions to.</param>
/// <returns>Whether or not conventions are applied.</returns>
#if NET || NETCOREAPP
#if NET || NETCORE
[AttachedPropertyBrowsableForTypeAttribute(typeof(DependencyObject))]
#endif
public static bool GetAtDesignTime(DependencyObject dependencyObject) {
Expand Down
2 changes: 1 addition & 1 deletion src/Caliburn.Micro.Platform/BindingScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public static bool RemoveChildResolver(ChildResolver resolver) {
continue;
}

#if NET || NETCOREAPP
#if NET || NETCORE
var childCount = (current is Visual || current is Visual3D)
? VisualTreeHelper.GetChildrenCount(current) : 0;
#else
Expand Down
4 changes: 0 additions & 4 deletions src/Caliburn.Micro.Platform/Caliburn.Micro.Platform.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,4 @@
<Compile Include="ViewModelLocator.cs" />
</ItemGroup>

<ItemGroup>
<None Remove="Platforms\net46-netcore\AssemblyInfo.cs" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Caliburn.Micro.Platform/ConventionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public static class ConventionManager {
/// Determines whether a custom update source trigger should be applied to the binding.
/// </summary>
public static Action<DependencyProperty, DependencyObject, Binding, PropertyInfo> ApplyUpdateSourceTrigger = (bindableProperty, element, binding, info) => {
#if WINDOWS_UWP || NET || NETCOREAPP
#if WINDOWS_UWP || NET || NETCORE
binding.UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged;
#endif
};
Expand Down Expand Up @@ -363,7 +363,7 @@ public static ElementConvention GetElementConvention(Type elementType) {
/// Determines whether a particular dependency property already has a binding on the provided element.
/// </summary>
public static bool HasBinding(FrameworkElement element, DependencyProperty property) {
#if NET || NETCOREAPP
#if NET || NETCORE
return BindingOperations.GetBindingBase(element, property) != null;
#else
return element.GetBindingExpression(property) != null;
Expand Down
5 changes: 4 additions & 1 deletion src/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcore'))">
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<DefineConstants>$(DefineConstants);NET</DefineConstants>
Expand All @@ -25,4 +28,4 @@
</Target>

<Target Name="Package" DependsOnTargets="Clean;Restore;Build;Pack" />
</Project>
</Project>

0 comments on commit df87ada

Please sign in to comment.