@@ -3977,18 +3977,13 @@ public System.IO.Stream GetCalendarAttachment(Model.Requests.GetCalendarAttachme
39773977 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "attachment" , request . attachment ) ;
39783978 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
39793979 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
3980- var response = apiInvoker . InvokeApi (
3980+ return apiInvoker . InvokeBinaryApi (
39813981 resourcePath ,
39823982 "GET" ,
39833983 null ,
39843984 null ,
39853985 null ) ;
3986- if ( response != null )
3987- {
3988- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
3989- }
3990-
3991- return null ;
3986+
39923987 }
39933988
39943989 #if ( NET452 || NETSTANDARD2_0 )
@@ -4023,18 +4018,13 @@ public System.IO.Stream GetCalendarAttachment(Model.Requests.GetCalendarAttachme
40234018 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "attachment" , request . attachment ) ;
40244019 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
40254020 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
4026- var response = await apiInvoker . InvokeApiAsync (
4021+ return await apiInvoker . InvokeBinaryApiAsync (
40274022 resourcePath ,
40284023 "GET" ,
40294024 null ,
40304025 null ,
40314026 null ) ;
4032- if ( response != null )
4033- {
4034- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
4035- }
4036-
4037- return null ;
4027+
40384028 }
40394029 #endif
40404030
@@ -4431,18 +4421,13 @@ public System.IO.Stream GetContactAttachment(Model.Requests.GetContactAttachment
44314421 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "attachment" , request . attachment ) ;
44324422 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
44334423 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
4434- var response = apiInvoker . InvokeApi (
4424+ return apiInvoker . InvokeBinaryApi (
44354425 resourcePath ,
44364426 "GET" ,
44374427 null ,
44384428 null ,
44394429 null ) ;
4440- if ( response != null )
4441- {
4442- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
4443- }
4444-
4445- return null ;
4430+
44464431 }
44474432
44484433 #if ( NET452 || NETSTANDARD2_0 )
@@ -4485,18 +4470,13 @@ public System.IO.Stream GetContactAttachment(Model.Requests.GetContactAttachment
44854470 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "attachment" , request . attachment ) ;
44864471 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
44874472 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
4488- var response = await apiInvoker . InvokeApiAsync (
4473+ return await apiInvoker . InvokeBinaryApiAsync (
44894474 resourcePath ,
44904475 "GET" ,
44914476 null ,
44924477 null ,
44934478 null ) ;
4494- if ( response != null )
4495- {
4496- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
4497- }
4498-
4499- return null ;
4479+
45004480 }
45014481 #endif
45024482
@@ -5009,18 +4989,13 @@ public System.IO.Stream GetEmailAsFile(Model.Requests.GetEmailAsFileRequest requ
50094989 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "format" , request . format ) ;
50104990 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
50114991 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
5012- var response = apiInvoker . InvokeApi (
4992+ return apiInvoker . InvokeBinaryApi (
50134993 resourcePath ,
50144994 "GET" ,
50154995 null ,
50164996 null ,
50174997 null ) ;
5018- if ( response != null )
5019- {
5020- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
5021- }
5022-
5023- return null ;
4998+
50244999 }
50255000
50265001 #if ( NET452 || NETSTANDARD2_0 )
@@ -5055,18 +5030,13 @@ public System.IO.Stream GetEmailAsFile(Model.Requests.GetEmailAsFileRequest requ
50555030 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "format" , request . format ) ;
50565031 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
50575032 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
5058- var response = await apiInvoker . InvokeApiAsync (
5033+ return await apiInvoker . InvokeBinaryApiAsync (
50595034 resourcePath ,
50605035 "GET" ,
50615036 null ,
50625037 null ,
50635038 null ) ;
5064- if ( response != null )
5065- {
5066- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
5067- }
5068-
5069- return null ;
5039+
50705040 }
50715041 #endif
50725042
@@ -5101,18 +5071,13 @@ public System.IO.Stream GetEmailAttachment(Model.Requests.GetEmailAttachmentRequ
51015071 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "fileName" , request . fileName ) ;
51025072 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
51035073 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
5104- var response = apiInvoker . InvokeApi (
5074+ return apiInvoker . InvokeBinaryApi (
51055075 resourcePath ,
51065076 "GET" ,
51075077 null ,
51085078 null ,
51095079 null ) ;
5110- if ( response != null )
5111- {
5112- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
5113- }
5114-
5115- return null ;
5080+
51165081 }
51175082
51185083 #if ( NET452 || NETSTANDARD2_0 )
@@ -5147,18 +5112,13 @@ public System.IO.Stream GetEmailAttachment(Model.Requests.GetEmailAttachmentRequ
51475112 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "fileName" , request . fileName ) ;
51485113 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
51495114 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
5150- var response = await apiInvoker . InvokeApiAsync (
5115+ return await apiInvoker . InvokeBinaryApiAsync (
51515116 resourcePath ,
51525117 "GET" ,
51535118 null ,
51545119 null ,
51555120 null ) ;
5156- if ( response != null )
5157- {
5158- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
5159- }
5160-
5161- return null ;
5121+
51625122 }
51635123 #endif
51645124
@@ -5605,18 +5565,13 @@ public System.IO.Stream GetMapiAttachment(Model.Requests.GetMapiAttachmentReques
56055565 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "attachment" , request . attachment ) ;
56065566 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
56075567 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
5608- var response = apiInvoker . InvokeApi (
5568+ return apiInvoker . InvokeBinaryApi (
56095569 resourcePath ,
56105570 "GET" ,
56115571 null ,
56125572 null ,
56135573 null ) ;
5614- if ( response != null )
5615- {
5616- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
5617- }
5618-
5619- return null ;
5574+
56205575 }
56215576
56225577 #if ( NET452 || NETSTANDARD2_0 )
@@ -5651,18 +5606,13 @@ public System.IO.Stream GetMapiAttachment(Model.Requests.GetMapiAttachmentReques
56515606 resourcePath = UrlHelper . AddPathParameter ( resourcePath , "attachment" , request . attachment ) ;
56525607 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "folder" , request . folder ) ;
56535608 resourcePath = UrlHelper . AddQueryParameterToUrl ( resourcePath , "storage" , request . storage ) ;
5654- var response = await apiInvoker . InvokeApiAsync (
5609+ return await apiInvoker . InvokeBinaryApiAsync (
56555610 resourcePath ,
56565611 "GET" ,
56575612 null ,
56585613 null ,
56595614 null ) ;
5660- if ( response != null )
5661- {
5662- return SerializationHelper . Deserialize < System . IO . Stream > ( response ) ;
5663- }
5664-
5665- return null ;
5615+
56665616 }
56675617 #endif
56685618
0 commit comments