Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from CodeFactor #256

Merged
merged 2 commits into from
May 19, 2024
Merged
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
3 changes: 1 addition & 2 deletions Src/VTEX/GoodPractices/BridgeException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand All @@ -20,7 +20,6 @@
/// Class BridgeException. This class cannot be inherited.
/// </summary>
/// <seealso cref="Exception" />

[Serializable]
public class BridgeException : Exception
{
Expand All @@ -41,6 +40,6 @@
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
protected BridgeException(SerializationInfo info, StreamingContext context)
: base(info, context) { }

Check warning on line 43 in Src/VTEX/GoodPractices/BridgeException.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)
}
}
3 changes: 1 addition & 2 deletions Src/VTEX/GoodPractices/UnexpectedApiResponseException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand All @@ -23,7 +23,6 @@
/// </summary>
/// <seealso cref="IRestException" />
/// <seealso cref="Exception" />

[Serializable]
public class UnexpectedApiResponseException : Exception, IRestException
{
Expand Down Expand Up @@ -85,8 +84,8 @@
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="System.ArgumentNullException">info</exception>
[SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]

Check warning on line 87 in Src/VTEX/GoodPractices/UnexpectedApiResponseException.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'SecurityPermissionAttribute' is obsolete: 'Code Access Security is not supported or honored by the runtime.' (https://aka.ms/dotnet-warnings/SYSLIB0003)

Check warning on line 87 in Src/VTEX/GoodPractices/UnexpectedApiResponseException.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'SecurityAction' is obsolete: 'Code Access Security is not supported or honored by the runtime.' (https://aka.ms/dotnet-warnings/SYSLIB0003)

Check warning on line 87 in Src/VTEX/GoodPractices/UnexpectedApiResponseException.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'SecurityPermissionAttribute' is obsolete: 'Code Access Security is not supported or honored by the runtime.' (https://aka.ms/dotnet-warnings/SYSLIB0003)

Check warning on line 87 in Src/VTEX/GoodPractices/UnexpectedApiResponseException.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'SecurityAction' is obsolete: 'Code Access Security is not supported or honored by the runtime.' (https://aka.ms/dotnet-warnings/SYSLIB0003)
public override void GetObjectData(SerializationInfo info, StreamingContext context)

Check warning on line 88 in Src/VTEX/GoodPractices/UnexpectedApiResponseException.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

Member 'UnexpectedApiResponseException.GetObjectData(SerializationInfo, StreamingContext)' overrides obsolete member 'Exception.GetObjectData(SerializationInfo, StreamingContext)'. Add the Obsolete attribute to 'UnexpectedApiResponseException.GetObjectData(SerializationInfo, StreamingContext)'.
{
if (info == null)
{
Expand Down
3 changes: 1 addition & 2 deletions Src/VTEX/GoodPractices/UpdatePriceInfoSKUException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand All @@ -20,7 +20,6 @@ namespace VTEX.GoodPractices
/// Class UpdatePriceInfoSKUException. This class cannot be inherited.
/// </summary>
/// <seealso cref="Exception" />

[Serializable]
public class UpdatePriceInfoSkuException : Exception
{
Expand Down
3 changes: 1 addition & 2 deletions Src/VTEX/GoodPractices/UpdateStockInfoSKUException.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand All @@ -20,7 +20,6 @@
/// Class UpdateStockInfoSKUException. This class cannot be inherited.
/// </summary>
/// <seealso cref="Exception" />

[Serializable]
public class UpdateStockInfoSKUException : Exception
{
Expand All @@ -39,6 +38,6 @@
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
protected UpdateStockInfoSKUException(SerializationInfo info, StreamingContext context)
: base(info, context) { }

Check warning on line 41 in Src/VTEX/GoodPractices/UpdateStockInfoSKUException.cs

View workflow job for this annotation

GitHub Actions / Deep Source Coverage report

'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051)
}
}
3 changes: 1 addition & 2 deletions Src/VTEX/Transport/Bridge/BridgeAction.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand All @@ -19,7 +19,6 @@ namespace VTEX.Transport.Bridge
/// <summary>
/// Class BridgeAction. This class cannot be inherited.
/// </summary>

[Serializer(SerializerFormat.Json)]
public sealed class BridgeAction
{
Expand Down
3 changes: 1 addition & 2 deletions Src/VTEX/Transport/Bridge/BridgeItem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-16-2023
Expand All @@ -23,7 +23,6 @@ namespace VTEX.Transport.Bridge
/// <summary>
/// Class BridgeItem. This class cannot be inherited.
/// </summary>

[Serializer(SerializerFormat.Json)]
public sealed class BridgeItem
{
Expand Down
5 changes: 1 addition & 4 deletions Src/VTEX/Transport/CallCenterOperatorData.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand All @@ -24,23 +24,20 @@ public sealed class CallCenterOperatorData
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>

[JsonProperty("id")]
public string Id { get; set; }

/// <summary>
/// Gets or sets the email.
/// </summary>
/// <value>The email.</value>

[JsonProperty("email")]
public string Email { get; set; }

/// <summary>
/// Gets or sets the name of the user.
/// </summary>
/// <value>The name of the user.</value>

[JsonProperty("userName")]
public string UserName { get; set; }
}
Expand Down
16 changes: 1 addition & 15 deletions Src/VTEX/Transport/ClientProfileData.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand Down Expand Up @@ -27,31 +27,27 @@ public sealed class ClientProfileData
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>

[JsonProperty("id")]
public string Id { get; set; }

/// <summary>
/// Gets or sets the email.
/// </summary>
/// <value>The email.</value>

[JsonProperty("email")]
public string Email { get; set; }

/// <summary>
/// Gets or sets the person's first name.
/// </summary>
/// <value>The name of the first.</value>

[JsonProperty("firstName")]
public string FirstName { get; set; }

/// <summary>
/// Gets or sets the person's last name.
/// </summary>
/// <value>The name of the last.</value>

[JsonProperty("lastName")]
public string LastName { get; set; }

Expand Down Expand Up @@ -85,79 +81,69 @@ public string DocumentTypeInternal
/// Gets or sets the document.
/// </summary>
/// <value>The document.</value>

[JsonProperty("document")]
public string Document { get; set; }

/// <summary>
/// Gets or sets the phone.
/// </summary>
/// <value>The phone.</value>

[JsonProperty("phone")]
public string Phone { get; set; }

/// <summary>
/// Gets or sets the name of the corporate.
/// </summary>
/// <value>The name of the corporate.</value>

[JsonProperty("corporateName")]
public string CorporateName { get; set; }

/// <summary>
/// Gets or sets the name of the trade.
/// </summary>
/// <value>The name of the trade.</value>

[JsonProperty("tradeName")]
public string TradeName { get; set; }

/// <summary>
/// Gets or sets the corporate document.
/// </summary>
/// <value>The corporate document.</value>

[JsonProperty("corporateDocument")]
public string CorporateDocument { get; set; }

/// <summary>
/// Gets or sets the state inscription.
/// </summary>
/// <value>The state inscription.</value>

[JsonProperty("stateInscription")]
public string StateInscription { get; set; }

/// <summary>
/// Gets or sets the postal code.
/// </summary>
/// <value>The postal code.</value>

[JsonProperty("postalCode")]
public string PostalCode { get; set; }

/// <summary>
/// Gets or sets the corporate phone.
/// </summary>
/// <value>The corporate phone.</value>

[JsonProperty("corporatePhone")]
public string CorporatePhone { get; set; }

/// <summary>
/// Gets or sets a value indicating whether this object is corporate.
/// </summary>
/// <value>true if this object is corporate, false if not.</value>

[JsonProperty("isCorporate")]
public bool IsCorporate { get; set; }

/// <summary>
/// Gets or sets the identifier of the user profile.
/// </summary>
/// <value>The identifier of the user profile.</value>

[JsonProperty("userProfileId")]
public string UserProfileId { get; set; }

Expand Down
3 changes: 1 addition & 2 deletions Src/VTEX/Transport/Item.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand Down Expand Up @@ -118,7 +118,6 @@ public sealed class Item
/// Gets or sets the components.
/// </summary>
/// <value>The components.</value>

[JsonProperty("components")]
public Item[] Components { get; set; }

Expand Down
20 changes: 1 addition & 19 deletions Src/VTEX/Transport/List.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ***********************************************************************
// ***********************************************************************
// Assembly : VTEX
// Author : Guilherme Branco Stracini
// Created : 01-15-2023
Expand Down Expand Up @@ -26,143 +26,125 @@ public sealed class List
/// Gets or sets the identifier of the order.
/// </summary>
/// <value>The identifier of the order.</value>

[JsonProperty("orderId")]
public string OrderId { get; set; }

/// <summary>
/// Gets or sets the creation date.
/// </summary>
/// <value>The creation date.</value>

[JsonProperty("creationDate")]
public DateTime CreationDate { get; set; }

/// <summary>
/// Gets or sets the name of the client.
/// </summary>
/// <value>The name of the client.</value>

[JsonProperty("clientName")]
public string ClientName { get; set; }

/// <summary>
/// Gets or sets the items.
/// </summary>
/// <value>The items.</value>

[JsonProperty("items")]
public ListItem[] Items { get; set; }

/// <summary>
/// Gets or sets the total number of value.
/// </summary>
/// <value>The total number of value.</value>

[JsonProperty("totalValue")]
public decimal TotalValue { get; set; }

/// <summary>
/// Gets or sets a list of names of the payments.
/// </summary>
/// <value>A list of names of the payments.</value>

[JsonProperty("paymentNames")]
public string PaymentNames { get; set; }

/// <summary>
/// Gets or sets the status.
/// </summary>
/// <value>The status.</value>

[JsonProperty("status")]
public string Status { get; set; }

/// <summary>
/// Gets or sets information describing the status.
/// </summary>
/// <value>Information describing the status.</value>

[JsonProperty("statusDescription")]
public string StatusDescription { get; set; }

/// <summary>
/// Gets or sets the identifier of the market place order.
/// </summary>
/// <value>The identifier of the market place order.</value>

[JsonProperty("marketPlaceOrderId")]
public string MarketPlaceOrderId { get; set; }

/// <summary>
/// Gets or sets the sequence.
/// </summary>
/// <value>The sequence.</value>

[JsonProperty("sequence")]
public int Sequence { get; set; }

/// <summary>
/// Gets or sets the sales channel.
/// </summary>
/// <value>The sales channel.</value>

[JsonProperty("salesChannel")]
public int SalesChannel { get; set; }

/// <summary>
/// Gets or sets the identifier of the affiliate.
/// </summary>
/// <value>The identifier of the affiliate.</value>

[JsonProperty("affiliateId")]
public string AffiliateId { get; set; }

/// <summary>
/// Gets or sets the origin.
/// </summary>
/// <value>The origin.</value>

[JsonProperty("origin")]
public string Origin { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the workflow in error state.
/// </summary>
/// <value>true if workflow in error state, false if not.</value>

[JsonProperty("workflowInErrorState")]
public bool WorkflowInErrorState { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the workflow in retry.
/// </summary>
/// <value>true if workflow in retry, false if not.</value>

[JsonProperty("workflowInRetry")]
public bool WorkflowInRetry { get; set; }

/// <summary>
/// Gets or sets the last message unread.
/// </summary>
/// <value>The last message unread.</value>

[JsonProperty("lastMessageUnread")]
public string LastMessageUnread { get; set; }

/// <summary>
/// Gets or sets the shipping estimated date.
/// </summary>
/// <value>The shipping estimated date.</value>

[JsonProperty("ShippingEstimatedDate")]
public DateTime? ShippingEstimatedDate { get; set; }

/// <summary>
/// Gets or sets a value indicating whether the order is complete.
/// </summary>
/// <value>true if order is complete, false if not.</value>

[JsonProperty("orderIsComplete")]
public bool OrderIsComplete { get; set; }

Expand Down
Loading
Loading