You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PrintBarCode and PrintQRCode should be renamed as they don't actually print anything, but rather create the necessary command for a barcode/qrcode.
New name should be just Barcode and QRCode
As this is clearly a breaking change, we should first create the new Barcode() and QRCode() methods which will contain the actual code and the previous PrintBarCode and PrintQRCode must be marked as obsolete methods and instead of containing code, they must only call the newly created methods.
After this change is deployed, version should be bumped to 1.2.4 and the usage of the obsolete methods should just generate a warning by decorating the methods with the Obsolete attribute as shown below.
[Obsolete(nameof(PrintBarCode)+" is deprecated, please use "+nameof(Barcode)+" instead.")]
On the next version, it must be bumped to 1.3.0 and the Obsolete attribute must be changed in order to throw a compilation error if the old method is used. This can be done by adding a new bool parameter to the attribute
[Obsolete(nameof(PrintBarCode)+" is deprecated, please use "+nameof(Barcode)+" instead.",true)]
And then, on version 1.3.1 we can just get rid of the old methods :)
The text was updated successfully, but these errors were encountered:
PrintBarCode
andPrintQRCode
should be renamed as they don't actually print anything, but rather create the necessary command for a barcode/qrcode.New name should be just
Barcode
andQRCode
As this is clearly a breaking change, we should first create the new
Barcode()
andQRCode()
methods which will contain the actual code and the previousPrintBarCode
andPrintQRCode
must be marked as obsolete methods and instead of containing code, they must only call the newly created methods.After this change is deployed, version should be bumped to
1.2.4
and the usage of the obsolete methods should just generate a warning by decorating the methods with the Obsolete attribute as shown below.On the next version, it must be bumped to
1.3.0
and the Obsolete attribute must be changed in order to throw a compilation error if the old method is used. This can be done by adding a new bool parameter to the attributeAnd then, on version 1.3.1 we can just get rid of the old methods :)
The text was updated successfully, but these errors were encountered: