mirror of
				https://github.com/JKorf/CryptoExchange.Net
				synced 2025-10-27 16:37:24 +00:00 
			
		
		
		
	Merge pull request #86 from Zebio21/master
Added ValidateNullOrNotEmpty
This commit is contained in:
		
						commit
						a71cb3c90e
					
				| @ -6,16 +6,16 @@ | ||||
|     <PackageId>CryptoExchange.Net</PackageId> | ||||
|     <Authors>JKorf</Authors> | ||||
|     <Description>A base package for implementing cryptocurrency exchange API's</Description> | ||||
|     <PackageVersion>3.8.0</PackageVersion> | ||||
|     <PackageVersion>3.8.1</PackageVersion> | ||||
|     <AssemblyVersion>3.8.0</AssemblyVersion> | ||||
|     <FileVersion>3.8.0</FileVersion> | ||||
|     <FileVersion>3.8.1</FileVersion> | ||||
|     <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance> | ||||
|     <RepositoryType>git</RepositoryType> | ||||
|     <RepositoryUrl>https://github.com/JKorf/CryptoExchange.Net.git</RepositoryUrl> | ||||
|     <PackageProjectUrl>https://github.com/JKorf/CryptoExchange.Net</PackageProjectUrl> | ||||
|     <NeutralLanguage>en</NeutralLanguage> | ||||
|     <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||||
|     <PackageReleaseNotes>3.8.0 - Better handling of json errors while deserializing stream, Added string datetime converter</PackageReleaseNotes> | ||||
|     <PackageReleaseNotes>3.8.1 - Added ValidateNullOrNotEmpty method extension</PackageReleaseNotes> | ||||
|     <Nullable>enable</Nullable> | ||||
|     <LangVersion>8.0</LangVersion> | ||||
|     <PackageLicenseExpression>MIT</PackageLicenseExpression> | ||||
|  | ||||
| @ -930,6 +930,13 @@ | ||||
|             <param name="value">The value of the string</param> | ||||
|             <param name="argumentName">Name of the parameter</param> | ||||
|         </member> | ||||
|         <member name="M:CryptoExchange.Net.ExtensionMethods.ValidateNullOrNotEmpty(System.String,System.String)"> | ||||
|             <summary> | ||||
|             Validates a string is null or not empty | ||||
|             </summary> | ||||
|             <param name="value"></param> | ||||
|             <param name="argumentName"></param> | ||||
|         </member> | ||||
|         <member name="M:CryptoExchange.Net.ExtensionMethods.ValidateNotNull(System.Object,System.String)"> | ||||
|             <summary> | ||||
|             Validates an object is not null | ||||
| @ -3512,9 +3519,7 @@ | ||||
|         <member name="M:CryptoExchange.Net.Sockets.WebsocketFactory.CreateWebsocket(CryptoExchange.Net.Logging.Log,System.String,System.Collections.Generic.IDictionary{System.String,System.String},System.Collections.Generic.IDictionary{System.String,System.String})"> | ||||
|             <inheritdoc /> | ||||
|         </member> | ||||
|     </members> | ||||
| </doc> | ||||
| System.Diagnostics.CodeAnalysis.AllowNullAttribute"> | ||||
|         <member name="T:System.Diagnostics.CodeAnalysis.AllowNullAttribute"> | ||||
|             <summary> | ||||
|                 Specifies that <see langword="null"/> is allowed as an input even if the | ||||
|                 corresponding type disallows it. | ||||
|  | ||||
| @ -253,6 +253,17 @@ namespace CryptoExchange.Net | ||||
|                 throw new ArgumentException($"No value provided for parameter {argumentName}", argumentName); | ||||
|         } | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Validates a string is null or not empty | ||||
|         /// </summary> | ||||
|         /// <param name="value"></param> | ||||
|         /// <param name="argumentName"></param> | ||||
|         public static void ValidateNullOrNotEmpty(this string value, string argumentName) | ||||
|         { | ||||
|             if (value != null && string.IsNullOrEmpty(value)) | ||||
|                 throw new ArgumentException($"No value provided for parameter {argumentName}", argumentName); | ||||
|         } | ||||
| 
 | ||||
|         /// <summary> | ||||
|         /// Validates an object is not null | ||||
|         /// </summary> | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user