Class FabricDataSharesClient
public class FabricDataSharesClient
- Inheritance
-
FabricDataSharesClient
- Inherited Members
Constructors
FabricDataSharesClient(string, HttpClient)
public FabricDataSharesClient(string baseUrl, HttpClient httpClient)
Parameters
baseUrlstringhttpClientHttpClient
Properties
BaseUrl
public string BaseUrl { get; set; }
Property Value
JsonSerializerSettings
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
- JsonSerializerSettings
ReadResponseAsString
public bool ReadResponseAsString { get; set; }
Property Value
Methods
DeleteAsync(long, CancellationToken)
Deletes the Fabric Data Share with the given id.
public virtual Task DeleteAsync(long fabricDataShareId, CancellationToken cancellationToken = default)
Parameters
fabricDataShareIdlongThe Fabric Data Share id.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
The delete External Data Share request was accepted.
Exceptions
- NfieldSdkException
A server side error occurred.
DeleteSurveyForFabricDataShareAsync(long, string, CancellationToken)
Deletes the requested survey that belongs to the given Fabric Data Share.
public virtual Task DeleteSurveyForFabricDataShareAsync(long fabricDataShareId, string nfieldSurveyId, CancellationToken cancellationToken = default)
Parameters
fabricDataShareIdlongThe Fabric Data Share id.
nfieldSurveyIdstringThe Survey to be removed.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
The delete External Data Share request was accepted.
Exceptions
- NfieldSdkException
A server side error occurred.
GetAllAsync(CancellationToken)
Gets a list of the existing Fabric Data Shares.
public virtual Task<ICollection<FabricDataShareListResponseModel>> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<FabricDataShareListResponseModel>>
Returns the list of the existing Fabric Data Shares
Exceptions
- NfieldSdkException
A server side error occurred.
GetAsync(long, CancellationToken)
Gets the Fabric Data Share for the given id.
public virtual Task<FabricDataShareResponseModel> GetAsync(long fabricDataShareId, CancellationToken cancellationToken = default)
Parameters
fabricDataShareIdlongThe Fabric Data Share id.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<FabricDataShareResponseModel>
Returns the Fabric Data Share
Exceptions
- NfieldSdkException
A server side error occurred.
GetSurveysForFabricDataShareAsync(long, CancellationToken)
Gets the surveys included in the Fabric Data Share.
public virtual Task<ICollection<FabricDataShareSurveyListResponseModel>> GetSurveysForFabricDataShareAsync(long fabricDataShareId, CancellationToken cancellationToken = default)
Parameters
fabricDataShareIdlongThe Fabric Data Share id.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task<ICollection<FabricDataShareSurveyListResponseModel>>
Returns the surveys included in the Fabric Data Share
Exceptions
- NfieldSdkException
A server side error occurred.
PostAsync(FabricDataShareCreateRequestModel, CancellationToken)
Creates a new Fabric Data Share based on the given data.
public virtual Task PostAsync(FabricDataShareCreateRequestModel model, CancellationToken cancellationToken = default)
Parameters
modelFabricDataShareCreateRequestModelThe info which will be used in the creation process.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
Returns the Fabric Data Share Id and the invitation url
Exceptions
- NfieldSdkException
A server side error occurred.
PostFabricDataSharesSurveysAsync(long, string, CancellationToken)
Adds the selected survey to the given Fabric Data Share.
public virtual Task PostFabricDataSharesSurveysAsync(long fabricDataShareId, string nfieldSurveyId = null, CancellationToken cancellationToken = default)
Parameters
fabricDataShareIdlongThe Fabric Data Share Id.
nfieldSurveyIdstringThe id of the survey to be added.
cancellationTokenCancellationTokenA cancellation token that can be used by other objects or threads to receive notice of cancellation.
Returns
- Task
The selected survey has been added to the Fabric Data Share
Exceptions
- NfieldSdkException
A server side error occurred.
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
protected virtual Task<FabricDataSharesClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
responseHttpResponseMessageheadersIReadOnlyDictionary<string, IEnumerable<string>>cancellationTokenCancellationToken
Returns
Type Parameters
T