Skip to content
Snippets Groups Projects
Select Git revision
  • 2bc49f7f2cce7dbb8c0c0fd71e08cf37b7d8a0f2
  • master default protected
  • dev protected
  • gitkeep
  • Issue/2463-newCoscinePIDTypes
  • Issue/2309-docs
  • Issue/2259-updatePids
  • Issue/1910-MigrationtoNET6.0
  • Sprint/2022-01
  • Sprint/2021-03
  • Product/1287-dotnet5Sharepoint
  • Topic/1334-dotnet5migration
  • Sprint/2021-01
  • Product/407-net5migration
  • Topic/1226-proxyApiLibraryMigration
  • v3.0.3
  • v3.0.2
  • v3.0.1
  • v3.0.0
  • v2.1.0
  • v2.0.0
  • v1.4.0
  • v1.3.0
  • v1.2.1
  • v1.2.0
  • v1.1.0
  • v1.0.0
27 results

ApiResponse.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ApiResponse.cs 694 B
    using System.Runtime.Serialization;
    
    namespace Coscine.ProxyApi.Utils
    {
        [DataContract]
        public class ApiResponse<T>
        {
            [DataMember]
            public T Data { get; set; }
            [DataMember]
            public int StatusCode { get; set; }
            [DataMember]
            public string StatusInfo { get; set; }
            [DataMember]
            public bool IsError { get; set; }
    
            public ApiResponse(T data, string statusText, int statusCode, bool error)
            {
                this.Data = data;
                this.StatusInfo = statusText;
                this.StatusCode = statusCode;
                this.IsError = error;
            }
    
            public ApiResponse()
            {
            }
        }
    }