Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ void SetupPart(System.Reflection.TypeInfo sourceType, BindingExpressionPart part
#if NETSTANDARD1_0
foreach (MethodInfo m in sourceType.AsType().GetRuntimeMethods())
{
if (m.Name.EndsWith("IElementController.SetValueFromRenderer"))
if (m.Name.EndsWith("IElementController.SetValueFromRenderer", StringComparison.Ordinal))
{
ParameterInfo[] parameters = m.GetParameters();
if (parameters.Length == 2 && parameters[0].ParameterType == typeof(BindableProperty))
Expand Down Expand Up @@ -454,7 +454,7 @@ bool TryConvert(ref object value, Type convertTo, bool toTarget)
var stringValue = value as string ?? string.Empty;
// see: https://bugzilla.xamarin.com/show_bug.cgi?id=32871
// do not canonicalize "*.[.]"; "1." should not update bound BindableProperty
if (stringValue.EndsWith(".") && DecimalTypes.Contains(convertTo))
if (stringValue.EndsWith(".", StringComparison.Ordinal) && DecimalTypes.Contains(convertTo))
throw new FormatException();

// do not canonicalize "-0"; user will likely enter a period after "-0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ internal void RegisterAssemblyRecursively(Assembly asm)

foreach (var refName in asm.GetReferencedAssemblies())
{
if (!refName.Name.StartsWith("System.") && !refName.Name.StartsWith("Microsoft.") && !refName.Name.StartsWith("mscorlib"))
if (!refName.Name.StartsWith("System.", StringComparison.Ordinal) && !refName.Name.StartsWith("Microsoft.", StringComparison.Ordinal) && !refName.Name.StartsWith("mscorlib", StringComparison.Ordinal))
{
try
{
Expand Down
12 changes: 6 additions & 6 deletions src/Tizen.NUI/src/public/BaseComponents/ImageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static ImageView()
private static string ConvertResourceUrl(ref string value)
{
value ??= "";
if (value.StartsWith("*Resource*"))
if (value.StartsWith("*Resource*", StringComparison.Ordinal))
{
string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
value = value.Replace("*Resource*", resource);
Expand Down Expand Up @@ -578,7 +578,7 @@ private void SetInternalImage(PropertyMap propMap)
ret = urlValue.Get(out url);
}
using PropertyMap mmap = new PropertyMap();
if (ret && url.StartsWith("*Resource*"))
if (ret && url.StartsWith("*Resource*", StringComparison.Ordinal))
{
url = url.Replace("*Resource*", resource);
using var pv = new PropertyValue(url);
Expand All @@ -591,7 +591,7 @@ private void SetInternalImage(PropertyMap propMap)
{
ret = alphaMaskUrlValue.Get(out alphaMaskURL);
}
if (ret && alphaMaskURL.StartsWith("*Resource*"))
if (ret && alphaMaskURL.StartsWith("*Resource*", StringComparison.Ordinal))
{
alphaMaskURL = alphaMaskURL.Replace("*Resource*", resource);
using var pv = new PropertyValue(alphaMaskURL);
Expand All @@ -604,7 +604,7 @@ private void SetInternalImage(PropertyMap propMap)
{
ret = auxiliaryImageURLValue.Get(out auxiliaryImageURL);
}
if (ret && auxiliaryImageURL.StartsWith("*Resource*"))
if (ret && auxiliaryImageURL.StartsWith("*Resource*", StringComparison.Ordinal))
{
auxiliaryImageURL = auxiliaryImageURL.Replace("*Resource*", resource);
using var pv = new PropertyValue(auxiliaryImageURL);
Expand Down Expand Up @@ -2654,11 +2654,11 @@ private bool SynchronousVisualCreationRequired()
{
return true;
}
if (_resourceUrl.StartsWith("dali://") || _resourceUrl.StartsWith("enbuf://"))
if (_resourceUrl.StartsWith("dali://", StringComparison.Ordinal) || _resourceUrl.StartsWith("enbuf://", StringComparison.Ordinal))
{
return true;
}
if (!string.IsNullOrEmpty(_alphaMaskUrl) && (_alphaMaskUrl.StartsWith("dali://") || _alphaMaskUrl.StartsWith("enbuf://")))
if (!string.IsNullOrEmpty(_alphaMaskUrl) && (_alphaMaskUrl.StartsWith("dali://", StringComparison.Ordinal) || _alphaMaskUrl.StartsWith("enbuf://", StringComparison.Ordinal)))
{
return true;
}
Expand Down
8 changes: 4 additions & 4 deletions src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,11 @@ private HorizontalAlignment GetInternalHorizontalAlignment()
return HorizontalAlignment.Begin; // Return default value.
}

if (temp.Equals("BEGIN"))
if (temp.Equals("BEGIN", StringComparison.Ordinal))
{
return HorizontalAlignment.Begin;
}
else if (temp.Equals("CENTER"))
else if (temp.Equals("CENTER", StringComparison.Ordinal))
{
return HorizontalAlignment.Center;
}
Expand Down Expand Up @@ -998,11 +998,11 @@ private VerticalAlignment GetInternalVerticalAlignment()
return VerticalAlignment.Top; // Return default value.
}

if (temp.Equals("TOP"))
if (temp.Equals("TOP", StringComparison.Ordinal))
{
return VerticalAlignment.Top;
}
else if (temp.Equals("CENTER"))
else if (temp.Equals("CENTER", StringComparison.Ordinal))
{
return VerticalAlignment.Center;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2174,7 +2174,7 @@ private void SetBackgroundImage(string value)
return;
}

if (value.StartsWith("*Resource*"))
if (value.StartsWith("*Resource*", StringComparison.Ordinal))
{
string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
value = value.Replace("*Resource*", resource);
Expand Down
4 changes: 2 additions & 2 deletions src/Tizen.NUI/src/public/Common/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,8 +1005,8 @@ public Color(string textColor) : this(Interop.Vector4.NewVector4(), true)
}
else // example rgb(255,255,255) or rgb(255,255,255,1.0)
{
bool isRGBA = textColor.StartsWith("RGBA(");
bool isRGB = textColor.StartsWith("RGB(");
bool isRGBA = textColor.StartsWith("RGBA(", StringComparison.Ordinal);
bool isRGB = textColor.StartsWith("RGB(", StringComparison.Ordinal);

if (!isRGBA && !isRGB)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Tizen.NUI/src/public/Utility/DpTypeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public override float ConvertScriptToPixel(string scriptValue)
float convertedValue = 0;
if (scriptValue != null)
{
if (scriptValue.EndsWith("dp"))
if (scriptValue.EndsWith("dp", StringComparison.Ordinal))
{
convertedValue = ConvertToPixel(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("dp")), CultureInfo.InvariantCulture));
}
else if (scriptValue.EndsWith("px"))
else if (scriptValue.EndsWith("px", StringComparison.Ordinal))
{
convertedValue = float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("px")), CultureInfo.InvariantCulture);
}
Expand Down
12 changes: 6 additions & 6 deletions src/Tizen.NUI/src/public/Utility/GraphicsTypeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,27 +288,27 @@ public float ConvertScriptToPixel(string scriptValue)
float convertedValue = 0;
if (scriptValue != null)
{
if (scriptValue.EndsWith("dp"))
if (scriptValue.EndsWith("dp", StringComparison.Ordinal))
{
convertedValue = Dp.ConvertScriptToPixel(scriptValue);
}
else if (scriptValue.EndsWith("sp"))
else if (scriptValue.EndsWith("sp", StringComparison.Ordinal))
{
convertedValue = Sp.ConvertScriptToPixel(scriptValue);
}
else if (scriptValue.EndsWith("sdp"))
else if (scriptValue.EndsWith("sdp", StringComparison.Ordinal))
{
convertedValue = Sdp.ConvertScriptToPixel(scriptValue);
}
else if (scriptValue.EndsWith("pt"))
else if (scriptValue.EndsWith("pt", StringComparison.Ordinal))
{
convertedValue = Point.ConvertScriptToPixel(scriptValue);
}
else if (scriptValue.EndsWith("spx"))
else if (scriptValue.EndsWith("spx", StringComparison.Ordinal))
{
convertedValue = scalingFactor * float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("spx")), CultureInfo.InvariantCulture);
}
else if (scriptValue.EndsWith("px"))
else if (scriptValue.EndsWith("px", StringComparison.Ordinal))
{
convertedValue = float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("px")), CultureInfo.InvariantCulture);
}
Expand Down
12 changes: 6 additions & 6 deletions src/Tizen.NUI/src/public/Utility/PointTypeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ public override float ConvertScriptToPixel(string scriptValue)
float convertedValue = 0;
if (scriptValue != null)
{
if (scriptValue.EndsWith("pt"))
if (scriptValue.EndsWith("pt", StringComparison.Ordinal))
{
convertedValue = ConvertToPixel(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("pt")), CultureInfo.InvariantCulture));
}
else if (scriptValue.EndsWith("px"))
else if (scriptValue.EndsWith("px", StringComparison.Ordinal))
{
convertedValue = float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("px")), CultureInfo.InvariantCulture);
}
Expand All @@ -93,19 +93,19 @@ public float ConvertScriptToPoint(string scriptValue)
float convertedValue = 0;
if (scriptValue != null)
{
if (scriptValue.EndsWith("sp"))
if (scriptValue.EndsWith("sp", StringComparison.Ordinal))
{
convertedValue = ConvertSpToPoint(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("sp")), CultureInfo.InvariantCulture));
}
else if (scriptValue.EndsWith("sdp"))
else if (scriptValue.EndsWith("sdp", StringComparison.Ordinal))
{
convertedValue = ConvertSdpToPoint(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("sdp")), CultureInfo.InvariantCulture));
}
else if (scriptValue.EndsWith("dp"))
else if (scriptValue.EndsWith("dp", StringComparison.Ordinal))
{
convertedValue = ConvertDpToPoint(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("dp")), CultureInfo.InvariantCulture));
}
else if (scriptValue.EndsWith("pt"))
else if (scriptValue.EndsWith("pt", StringComparison.Ordinal))
{
convertedValue = float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("px")), CultureInfo.InvariantCulture);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tizen.NUI/src/public/Utility/SdpTypeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override float ConvertScriptToPixel(string scriptValue)
float convertedValue = 0;
if (scriptValue != null)
{
if (scriptValue.EndsWith("sdp"))
if (scriptValue.EndsWith("sdp", StringComparison.Ordinal))
{
convertedValue = ConvertToPixel(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("sdp")), CultureInfo.InvariantCulture));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tizen.NUI/src/public/Utility/SpTypeConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public override float ConvertScriptToPixel(string scriptValue)
float convertedValue = 0;
if (scriptValue != null)
{
if (scriptValue.EndsWith("sp"))
if (scriptValue.EndsWith("sp", StringComparison.Ordinal))
{
convertedValue = ConvertToPixel(float.Parse(scriptValue.Substring(0, scriptValue.LastIndexOf("sp")), CultureInfo.InvariantCulture));
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tizen.NUI/src/public/ViewProperty/ImageShadow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ protected override PropertyMap GetPropertyMap()
map.Set(ImageVisualProperty.Border, Border);

string urlString = Url;
if (Url.StartsWith("*Resource*"))
if (Url.StartsWith("*Resource*", StringComparison.Ordinal))
{
string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
urlString = Url.Replace("*Resource*", resource);
Expand Down
4 changes: 2 additions & 2 deletions src/Tizen.NUI/src/public/Visuals/VisualObject/ImageVisual.cs
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,11 @@ private bool SynchronousVisualCreationRequired()
{
return true;
}
if (ResourceUrl.StartsWith("dali://") || ResourceUrl.StartsWith("enbuf://"))
if (ResourceUrl.StartsWith("dali://", StringComparison.Ordinal) || ResourceUrl.StartsWith("enbuf://", StringComparison.Ordinal))
{
return true;
}
if (!string.IsNullOrEmpty(AlphaMaskUrl) && (AlphaMaskUrl.StartsWith("dali://") || AlphaMaskUrl.StartsWith("enbuf://")))
if (!string.IsNullOrEmpty(AlphaMaskUrl) && (AlphaMaskUrl.StartsWith("dali://", StringComparison.Ordinal) || AlphaMaskUrl.StartsWith("enbuf://", StringComparison.Ordinal)))
{
return true;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Tizen.Pims.Calendar/Tizen.Pims.Calendar/CalendarDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,15 @@ public void Delete(CalendarList list)
record = list.GetCurrentRecord();
if (0 == propertyId)
{
if (0 == String.Compare(CalendarViews.Book.Uri, record.Uri))
if (CalendarViews.Book.Uri.Equals(record.Uri, StringComparison.Ordinal))
propertyId = CalendarViews.Book.Id;
else if (0 == String.Compare(CalendarViews.Event.Uri, record.Uri))
else if (CalendarViews.Event.Uri.Equals(record.Uri, StringComparison.Ordinal))
propertyId = CalendarViews.Event.Id;
else if (0 == String.Compare(CalendarViews.Todo.Uri, record.Uri))
else if (CalendarViews.Todo.Uri.Equals(record.Uri, StringComparison.Ordinal))
propertyId = CalendarViews.Todo.Id;
else if (0 == String.Compare(CalendarViews.Timezone.Uri, record.Uri))
else if (CalendarViews.Timezone.Uri.Equals(record.Uri, StringComparison.Ordinal))
propertyId = CalendarViews.Timezone.Id;
else if (0 == String.Compare(CalendarViews.Extended.Uri, record.Uri))
else if (CalendarViews.Extended.Uri.Equals(record.Uri, StringComparison.Ordinal))
propertyId = CalendarViews.Extended.Id;
else
{
Expand Down