Skip to content

Commit

Permalink
Fix using references after having multiple target frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee authored and cwensley committed Mar 17, 2023
1 parent 329a8fc commit 880fac8
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 37 deletions.
10 changes: 5 additions & 5 deletions src/Eto/Drawing/ColorConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ public override object ConvertTo(sc.ITypeDescriptorContext context, CultureInfo
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class ColorConverter : TypeConverter
public class ColorConverter : sc.TypeConverter
{
/// <summary>
/// Determines if this can convert a <see cref="Color"/> to the <paramref name="destinationType"/>
/// </summary>
/// <param name="context">Context of the conversion</param>
/// <param name="destinationType">Type to convert to</param>
/// <returns>True if this converter supports the <paramref name="destinationType"/>, false otherwise</returns>
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
public override bool CanConvertTo(sc.ITypeDescriptorContext context, Type destinationType)
{
return destinationType == typeof(string);
}
Expand All @@ -107,7 +107,7 @@ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinati
/// <param name="context">Context of the conversion</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this can convert to the <paramref name="sourceType"/>, false otherwise</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string);
}
Expand All @@ -119,7 +119,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="culture">Culture to use for the conversion</param>
/// <param name="value">Value to convert</param>
/// <returns>A <see cref="Color"/> instance with the converted value</returns>
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInfo culture, object value)
{
var str = value as string;
if (str != null)
Expand All @@ -140,7 +140,7 @@ public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo c
/// <param name="value"><see cref="Color"/> value to convert</param>
/// <param name="destinationType">Type to convert the <paramref name="value"/> to</param>
/// <returns>An object of type <paramref name="destinationType"/> converted from <paramref name="value"/></returns>
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
public override object ConvertTo(sc.ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
{
if (destinationType == typeof(string))
{
Expand Down
8 changes: 4 additions & 4 deletions src/Eto/Drawing/ImageConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public override object ConvertFrom (sc.ITypeDescriptorContext context, System.Gl
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class ImageConverter : TypeConverter
public class ImageConverter : sc.TypeConverter
{
/// <summary>
/// Prefix to use to load an image from a resource of an assembly
Expand Down Expand Up @@ -158,7 +158,7 @@ protected virtual bool IsIcon (string fileName)
/// <param name="context">Conversion context</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this converter can handle converting from the specified <paramref name="sourceType"/> to an image</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string) || typeof(NamespaceInfo).IsAssignableFrom(sourceType) || typeof(Stream).IsAssignableFrom(sourceType);
}
Expand All @@ -169,7 +169,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="context">Conversion context</param>
/// <param name="destinationType">Type to convert to</param>
/// <returns>True if this converter can convert to the specified <paramref name="destinationType"/>, otherwise false.</returns>
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
public override bool CanConvertTo(sc.ITypeDescriptorContext context, Type destinationType)
{
return false;
}
Expand Down Expand Up @@ -213,7 +213,7 @@ Image LoadImage (string resourceName)
/// <param name="culture">Culture to perform the conversion</param>
/// <param name="value">Value to convert to an image</param>
/// <returns>A new instance of an image, or null if it cannot be converted</returns>
public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)
{
if (value is NamespaceInfo ns)
return LoadImage(ns);
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Drawing/PaddingConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInf
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class PaddingConverter : TypeConverter
public class PaddingConverter : sc.TypeConverter
{
/// <summary>
/// The character to split up the string which will be converted
Expand All @@ -93,7 +93,7 @@ public class PaddingConverter : TypeConverter
/// <param name="context">Conversion context</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this converter can convert from the specified type, false otherwise</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string);
}
Expand All @@ -105,7 +105,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="culture">Culture to perform the conversion for</param>
/// <param name="value">Value to convert</param>
/// <returns>A new instance of the <see cref="Padding"/> object with the value represented by <paramref name="value"/></returns>
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text != null)
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Drawing/PointConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInf
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class PointConverter : TypeConverter
public class PointConverter : sc.TypeConverter
{
/// <summary>
/// The character to split up the string which will be converted
Expand All @@ -84,7 +84,7 @@ public class PointConverter : TypeConverter
/// <param name="context">Conversion context</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this converter can convert from the specified type, false otherwise</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string);
}
Expand All @@ -96,7 +96,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="culture">Culture to perform the conversion</param>
/// <param name="value">Value to convert</param>
/// <returns>A new instance of a <see cref="Point"/> converted from the specified <paramref name="value"/></returns>
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text != null)
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Drawing/PointFConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInf
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class PointFConverter : TypeConverter
public class PointFConverter : sc.TypeConverter
{
/// <summary>
/// The character to split up the string which will be converted
Expand All @@ -84,7 +84,7 @@ public class PointFConverter : TypeConverter
/// <param name="context">Conversion context</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this converter can convert from the specified type, false otherwise</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string);
}
Expand All @@ -96,7 +96,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="culture">Culture to perform the conversion</param>
/// <param name="value">Value to convert</param>
/// <returns>A new instance of a <see cref="PointF"/> converted from the specified <paramref name="value"/></returns>
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text != null)
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Drawing/RectangleConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInf
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class RectangleConverter : TypeConverter
public class RectangleConverter : sc.TypeConverter
{
/// <summary>
/// The character to split up the string which will be converted
Expand All @@ -85,7 +85,7 @@ public class RectangleConverter : TypeConverter
/// <param name="context">Conversion context</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this converter can convert from the specified type, false otherwise</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string);
}
Expand All @@ -97,7 +97,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="culture">Culture to perform the conversion</param>
/// <param name="value">Value to convert</param>
/// <returns>A new instance of a <see cref="Rectangle"/> converted from the specified <paramref name="value"/></returns>
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text != null)
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Drawing/RectangleFConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInf
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class RectangleFConverter : TypeConverter
public class RectangleFConverter : sc.TypeConverter
{
/// <summary>
/// The character to split up the string which will be converted
Expand All @@ -85,7 +85,7 @@ public class RectangleFConverter : TypeConverter
/// <param name="context">Conversion context</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this converter can convert from the specified type, false otherwise</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string);
}
Expand All @@ -97,7 +97,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="culture">Culture to perform the conversion</param>
/// <param name="value">Value to convert</param>
/// <returns>A new instance of a <see cref="RectangleF"/> converted from the specified <paramref name="value"/></returns>
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text != null)
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Drawing/SizeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInf
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class SizeConverter : TypeConverter
public class SizeConverter : sc.TypeConverter
{
/// <summary>
/// The character to split up the string which will be converted
Expand All @@ -83,7 +83,7 @@ public class SizeConverter : TypeConverter
/// <param name="context">Conversion context</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this converter can convert from the specified type, false otherwise</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string);
}
Expand All @@ -95,7 +95,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="culture">Culture to perform the conversion</param>
/// <param name="value">Value to convert</param>
/// <returns>A new instance of a <see cref="Size"/> converted from the specified <paramref name="value"/></returns>
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text != null)
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Drawing/SizeFConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInf
/// <copyright>(c) 2014 by Curtis Wensley</copyright>
/// <license type="BSD-3">See LICENSE for full terms</license>
[Obsolete("Since 2.5. Use TypeDescriptor.GetConverter instead")]
public class SizeFConverter : TypeConverter
public class SizeFConverter : sc.TypeConverter
{
/// <summary>
/// The character to split up the string which will be converted
Expand All @@ -83,7 +83,7 @@ public class SizeFConverter : TypeConverter
/// <param name="context">Conversion context</param>
/// <param name="sourceType">Type to convert from</param>
/// <returns>True if this converter can convert from the specified type, false otherwise</returns>
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
public override bool CanConvertFrom(sc.ITypeDescriptorContext context, Type sourceType)
{
return sourceType == typeof(string);
}
Expand All @@ -95,7 +95,7 @@ public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceT
/// <param name="culture">Culture to perform the conversion</param>
/// <param name="value">Value to convert</param>
/// <returns>A new instance of a <see cref="SizeF"/> converted from the specified <paramref name="value"/></returns>
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
public override object ConvertFrom(sc.ITypeDescriptorContext context, CultureInfo culture, object value)
{
string text = value as string;
if (text != null)
Expand Down
2 changes: 1 addition & 1 deletion src/Eto/Forms/Binding/ICommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !NETSTANDARD
#if !NETSTANDARD && !NETCOREAPP
using System;

namespace System.Windows.Input
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Forms/Controls/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ namespace Eto.Forms;
/// load/unload, and common events.
/// </remarks>
#if !NETSTANDARD
[ToolboxItem(true)]
[DesignTimeVisible(true)]
[DesignerCategory("Eto.Forms")]
[sc.ToolboxItem(true)]
[sc.DesignTimeVisible(true)]
[sc.DesignerCategory("Eto.Forms")]
#endif
[sc.TypeConverter(typeof(ControlConverter))]
public partial class Control : BindableWidget, IMouseInputSource, IKeyboardInputSource, ICallbackSource
Expand Down
6 changes: 3 additions & 3 deletions src/Eto/Forms/Layout/DynamicTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ protected override void SetItem(int index, DynamicItem item)
/// The maximum number of items in the <see cref="DynamicTable.Rows"/> determines the columns of the table.
/// </remarks>
[ContentProperty("Rows")]
public class DynamicTable : DynamicItem, ISupportInitialize
public class DynamicTable : DynamicItem, sc.ISupportInitialize
{
internal DynamicLayout layout;
bool visible = true;
Expand Down Expand Up @@ -405,11 +405,11 @@ public override Control Create(DynamicLayout layout)
return table;
}

void ISupportInitialize.BeginInit()
void sc.ISupportInitialize.BeginInit()
{
}

void ISupportInitialize.EndInit()
void sc.ISupportInitialize.EndInit()
{
}

Expand Down

0 comments on commit 880fac8

Please sign in to comment.