File tree Expand file tree Collapse file tree 6 files changed +32
-12
lines changed
Crawl/CrawlRetrieveResultsResponseProperties Expand file tree Collapse file tree 6 files changed +32
-12
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics . CodeAnalysis ;
34using System . Text . Json ;
45using System . Text . Json . Serialization ;
56using ResultVariants = Scrapegraphai . Models . Crawl . CrawlRetrieveResultsResponseProperties . ResultVariants ;
@@ -19,13 +20,13 @@ public static implicit operator Result(JsonElement value) =>
1920
2021 public static implicit operator Result ( string value ) => new ResultVariants ::String ( value ) ;
2122
22- public bool TryPickJsonElement ( out JsonElement ? value )
23+ public bool TryPickJsonElement ( [ NotNullWhen ( true ) ] out JsonElement ? value )
2324 {
2425 value = ( this as ResultVariants ::JsonElement ) ? . Value ;
2526 return value != null ;
2627 }
2728
28- public bool TryPickString ( out string ? value )
29+ public bool TryPickString ( [ NotNullWhen ( true ) ] out string ? value )
2930 {
3031 value = ( this as ResultVariants ::String ) ? . Value ;
3132 return value != null ;
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics . CodeAnalysis ;
34using System . Text . Json ;
45using System . Text . Json . Serialization ;
56using Scrapegraphai . Models . GenerateSchema . GenerateSchemaRetrieveResponseProperties ;
@@ -21,7 +22,7 @@ FailedSchemaGenerationResponse value
2122 ) => new GenerateSchemaRetrieveResponseVariants ::FailedSchemaGenerationResponse ( value ) ;
2223
2324 public bool TryPickCompletedSchemaGenerationResponse (
24- out CompletedSchemaGenerationResponse ? value
25+ [ NotNullWhen ( true ) ] out CompletedSchemaGenerationResponse ? value
2526 )
2627 {
2728 value = (
@@ -30,7 +31,9 @@ out CompletedSchemaGenerationResponse? value
3031 return value != null ;
3132 }
3233
33- public bool TryPickFailedSchemaGenerationResponse ( out FailedSchemaGenerationResponse ? value )
34+ public bool TryPickFailedSchemaGenerationResponse (
35+ [ NotNullWhen ( true ) ] out FailedSchemaGenerationResponse ? value
36+ )
3437 {
3538 value = (
3639 this as GenerateSchemaRetrieveResponseVariants ::FailedSchemaGenerationResponse
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics . CodeAnalysis ;
34using System . Text . Json ;
45using System . Text . Json . Serialization ;
56using Scrapegraphai . Models . Markdownify . MarkdownifyRetrieveStatusResponseProperties ;
@@ -19,15 +20,19 @@ public static implicit operator MarkdownifyRetrieveStatusResponse(
1920 FailedMarkdownifyResponse value
2021 ) => new MarkdownifyRetrieveStatusResponseVariants ::FailedMarkdownifyResponse ( value ) ;
2122
22- public bool TryPickCompletedMarkdownifyVariant ( out CompletedMarkdownify ? value )
23+ public bool TryPickCompletedMarkdownifyVariant (
24+ [ NotNullWhen ( true ) ] out CompletedMarkdownify ? value
25+ )
2326 {
2427 value = (
2528 this as MarkdownifyRetrieveStatusResponseVariants ::CompletedMarkdownifyVariant
2629 ) ? . Value ;
2730 return value != null ;
2831 }
2932
30- public bool TryPickFailedMarkdownifyResponse ( out FailedMarkdownifyResponse ? value )
33+ public bool TryPickFailedMarkdownifyResponse (
34+ [ NotNullWhen ( true ) ] out FailedMarkdownifyResponse ? value
35+ )
3136 {
3237 value = (
3338 this as MarkdownifyRetrieveStatusResponseVariants ::FailedMarkdownifyResponse
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics . CodeAnalysis ;
34using System . Text . Json ;
45using System . Text . Json . Serialization ;
56using Scrapegraphai . Models . Searchscraper . SearchscraperRetrieveStatusResponseProperties ;
@@ -20,15 +21,19 @@ public static implicit operator SearchscraperRetrieveStatusResponse(
2021 FailedSearchScraperResponse value
2122 ) => new SearchscraperRetrieveStatusResponseVariants ::FailedSearchScraperResponse ( value ) ;
2223
23- public bool TryPickCompletedSearchScraperVariant ( out CompletedSearchScraper ? value )
24+ public bool TryPickCompletedSearchScraperVariant (
25+ [ NotNullWhen ( true ) ] out CompletedSearchScraper ? value
26+ )
2427 {
2528 value = (
2629 this as SearchscraperRetrieveStatusResponseVariants ::CompletedSearchScraperVariant
2730 ) ? . Value ;
2831 return value != null ;
2932 }
3033
31- public bool TryPickFailedSearchScraperResponse ( out FailedSearchScraperResponse ? value )
34+ public bool TryPickFailedSearchScraperResponse (
35+ [ NotNullWhen ( true ) ] out FailedSearchScraperResponse ? value
36+ )
3237 {
3338 value = (
3439 this as SearchscraperRetrieveStatusResponseVariants ::FailedSearchScraperResponse
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics . CodeAnalysis ;
34using System . Text . Json ;
45using System . Text . Json . Serialization ;
56using Scrapegraphai . Models . Smartscraper . SmartscraperListResponseVariants ;
@@ -17,13 +18,15 @@ public static implicit operator SmartscraperListResponse(CompletedSmartscraper v
1718 public static implicit operator SmartscraperListResponse ( FailedSmartscraper value ) =>
1819 new FailedSmartscraperVariant ( value ) ;
1920
20- public bool TryPickCompletedSmartscraperVariant ( out CompletedSmartscraper ? value )
21+ public bool TryPickCompletedSmartscraperVariant (
22+ [ NotNullWhen ( true ) ] out CompletedSmartscraper ? value
23+ )
2124 {
2225 value = ( this as CompletedSmartscraperVariant ) ? . Value ;
2326 return value != null ;
2427 }
2528
26- public bool TryPickFailedSmartscraperVariant ( out FailedSmartscraper ? value )
29+ public bool TryPickFailedSmartscraperVariant ( [ NotNullWhen ( true ) ] out FailedSmartscraper ? value )
2730 {
2831 value = ( this as FailedSmartscraperVariant ) ? . Value ;
2932 return value != null ;
Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
3+ using System . Diagnostics . CodeAnalysis ;
34using System . Text . Json ;
45using System . Text . Json . Serialization ;
56using Scrapegraphai . Models . Smartscraper . SmartscraperRetrieveResponseVariants ;
@@ -17,13 +18,15 @@ public static implicit operator SmartscraperRetrieveResponse(CompletedSmartscrap
1718 public static implicit operator SmartscraperRetrieveResponse ( FailedSmartscraper value ) =>
1819 new FailedSmartscraperVariant ( value ) ;
1920
20- public bool TryPickCompletedSmartscraperVariant ( out CompletedSmartscraper ? value )
21+ public bool TryPickCompletedSmartscraperVariant (
22+ [ NotNullWhen ( true ) ] out CompletedSmartscraper ? value
23+ )
2124 {
2225 value = ( this as CompletedSmartscraperVariant ) ? . Value ;
2326 return value != null ;
2427 }
2528
26- public bool TryPickFailedSmartscraperVariant ( out FailedSmartscraper ? value )
29+ public bool TryPickFailedSmartscraperVariant ( [ NotNullWhen ( true ) ] out FailedSmartscraper ? value )
2730 {
2831 value = ( this as FailedSmartscraperVariant ) ? . Value ;
2932 return value != null ;
You can’t perform that action at this time.
0 commit comments