本文整理汇总了C#中DataViewMode类的典型用法代码示例。如果您正苦于以下问题:C# DataViewMode类的具体用法?C# DataViewMode怎么用?C# DataViewMode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DataViewMode类属于命名空间,在下文中一共展示了DataViewMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetExtra
/// <summary>
/// Retrieves the details of an extra attribute definition for the specified product type.
/// <example>
/// <code>
/// var result = ProductTypeExtraFactory.GetExtra(handler : handler, productTypeId : productTypeId, attributeFQN : attributeFQN, responseFields : responseFields, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<AttributeInProductType/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.ProductAdmin.AttributeInProductType GetExtra(ServiceClientMessageHandler handler,
int productTypeId, string attributeFQN, string responseFields = null, DataViewMode dataViewMode= DataViewMode.Live,
HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK)
{
SetSdKparameters();
var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name;
var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
Debug.WriteLine(currentMethodName + '.' + currentMethodName );
var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.Attributedefinition.Producttypes.ProductTypeExtraClient.GetExtraClient(
productTypeId : productTypeId, attributeFQN : attributeFQN, responseFields : responseFields, dataViewMode: dataViewMode );
try
{
apiClient.WithContext(handler.ApiContext).Execute();
}
catch (ApiException ex)
{
// Custom error handling for test cases can be placed here
Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode);
if (customException != null)
throw customException;
return null;
}
return ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode)
? (apiClient.Result())
: null;
}
示例2: GetDocumentTypes
/// <summary>
///
/// <example>
/// <code>
/// var result = DocumentTypeFactory.GetDocumentTypes(handler : handler, pageSize : pageSize, startIndex : startIndex, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<DocumentTypeCollection/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.Content.DocumentTypeCollection GetDocumentTypes(ServiceClientMessageHandler handler,
int? pageSize = null, int? startIndex = null, DataViewMode dataViewMode= DataViewMode.Live,
HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK)
{
SetSdKparameters();
var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name;
var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
Debug.WriteLine(currentMethodName + '.' + currentMethodName );
var apiClient = Mozu.Api.Clients.Content.DocumentTypeClient.GetDocumentTypesClient(
pageSize : pageSize, startIndex : startIndex, dataViewMode: dataViewMode );
try
{
apiClient.WithContext(handler.ApiContext).Execute();
}
catch (ApiException ex)
{
// Custom error handling for test cases can be placed here
Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode);
if (customException != null)
throw customException;
return null;
}
return ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode)
? (apiClient.Result())
: null;
}
示例3: DeleteAttribute
/// <summary>
/// Deletes a defined product attribute. You cannot delete an attribute assigned a value for a product.
/// </summary>
/// <param name="attributeFQN">The fully qualified name of the attribute, which is a user defined attribute identifier.</param>
/// <param name="dataViewMode">{<see cref="Mozu.Api.DataViewMode"/>}</param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var attribute = new Attribute();
/// attribute.DeleteAttribute(dataViewMode, attributeFQN);
/// </code>
/// </example>
public virtual void DeleteAttribute(DataViewMode dataViewMode, string attributeFQN)
{
MozuClient response;
var client = Mozu.Api.Clients.Commerce.Catalog.Admin.Attributedefinition.AttributeClient.DeleteAttributeClient(dataViewMode, attributeFQN);
client.WithContext(_apiContext);
response= client.Execute();
}
示例4: DeleteTreeDocumentContent
/// <summary>
/// Deletes the content associated with a document, such as a product image or PDF specifications file.
/// </summary>
/// <param name="documentListName">The name of the document list associated with the document.</param>
/// <param name="documentName">The name of the document, which is unique within its folder.</param>
/// <param name="stream"></param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var documenttree = new DocumentTree();
/// documenttree.DeleteTreeDocumentContent(dataViewMode, stream, documentListName, documentName, contentType);
/// </code>
/// </example>
public virtual void DeleteTreeDocumentContent(DataViewMode dataViewMode, System.IO.Stream stream, string documentListName, string documentName, String contentType= null)
{
MozuClient response;
var client = Mozu.Api.Clients.Content.Documentlists.DocumentTree.DocumentTreeClient.DeleteTreeDocumentContentClient(dataViewMode, stream, documentListName, documentName, contentType);
client.WithContext(_apiContext);
response= client.Execute();
}
示例5: AddProperty
/// <summary>
/// Configures a property attribute for the product specified in the request.
/// <example>
/// <code>
/// var result = ProductPropertyFactory.AddProperty(handler : handler, productProperty : productProperty, productCode : productCode, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<ProductProperty/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.ProductAdmin.ProductProperty AddProperty(ServiceClientMessageHandler handler,
Mozu.Api.Contracts.ProductAdmin.ProductProperty productProperty, string productCode, DataViewMode dataViewMode= DataViewMode.Live,
HttpStatusCode expectedCode = HttpStatusCode.Created, HttpStatusCode successCode = HttpStatusCode.Created)
{
SetSdKparameters();
var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name;
var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
Debug.WriteLine(currentMethodName + '.' + currentMethodName );
var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.Products.ProductPropertyClient.AddPropertyClient(
productProperty : productProperty, productCode : productCode, dataViewMode: dataViewMode );
try
{
apiClient.WithContext(handler.ApiContext).Execute();
}
catch (ApiException ex)
{
// Custom error handling for test cases can be placed here
Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode);
if (customException != null)
throw customException;
return null;
}
return ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode)
? (apiClient.Result())
: null;
}
示例6: DeleteFacetById
/// <summary>
/// Deletes the facet specified by its unique identifier.
/// </summary>
/// <param name="facetId">Unique identifier of the facet to delete.</param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var facet = new Facet();
/// facet.DeleteFacetById(dataViewMode, facetId);
/// </code>
/// </example>
public virtual void DeleteFacetById(DataViewMode dataViewMode, int facetId)
{
MozuClient response;
var client = Mozu.Api.Clients.Commerce.Catalog.Admin.FacetClient.DeleteFacetByIdClient(dataViewMode, facetId);
client.WithContext(_apiContext);
response= client.Execute();
}
示例7: DeleteDiscount
/// <summary>
/// Deletes a discount specified by its discount ID.
/// <example>
/// <code>
/// var result = DiscountFactory.DeleteDiscount(handler : handler, discountId : discountId, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<void/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static void DeleteDiscount(ServiceClientMessageHandler handler,
int discountId, DataViewMode dataViewMode= DataViewMode.Live,
HttpStatusCode expectedCode = HttpStatusCode.NoContent, HttpStatusCode successCode = HttpStatusCode.NoContent)
{
SetSdKparameters();
var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name;
var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
Debug.WriteLine(currentMethodName + '.' + currentMethodName );
var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.DiscountClient.DeleteDiscountClient(
discountId : discountId, dataViewMode: dataViewMode );
try
{
apiClient.WithContext(handler.ApiContext).Execute();
}
catch (ApiException ex)
{
// Custom error handling for test cases can be placed here
Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode);
if (customException != null)
throw customException;
}
var noResponse = ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode)
? (apiClient.Result())
: null;
}
示例8: DeleteOption
/// <summary>
/// Removes an option attribute definition for the specified product type.
/// </summary>
/// <param name="attributeFQN">The fully qualified name of the attribute, which is a user defined attribute identifier.</param>
/// <param name="productTypeId">Identifier of the product type.</param>
/// <param name="dataViewMode">{<see cref="Mozu.Api.DataViewMode"/>}</param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var producttypeoption = new ProductTypeOption();
/// producttypeoption.DeleteOption(dataViewMode, productTypeId, attributeFQN);
/// </code>
/// </example>
public virtual void DeleteOption(DataViewMode dataViewMode, int productTypeId, string attributeFQN)
{
MozuClient response;
var client = Mozu.Api.Clients.Commerce.Catalog.Admin.Attributedefinition.Producttypes.ProductTypeOptionClient.DeleteOptionClient(dataViewMode, productTypeId, attributeFQN);
client.WithContext(_apiContext);
response= client.Execute();
}
示例9: PublishDrafts
/// <summary>
/// Publishes the draft version of product changes for each product code specified in the request, and changes the product publish state to "live".
/// </summary>
/// <param name="dataViewMode">{<see cref="Mozu.Api.DataViewMode"/>}</param>
/// <param name="publishScope">Properties of the pending product changes to include in this operation.</param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var publishingscope = new PublishingScope();
/// publishingscope.PublishDrafts(dataViewMode, publishScope);
/// </code>
/// </example>
public virtual void PublishDrafts(DataViewMode dataViewMode, Mozu.Api.Contracts.ProductAdmin.PublishingScope publishScope)
{
MozuClient response;
var client = Mozu.Api.Clients.Commerce.Catalog.Admin.PublishingScopeClient.PublishDraftsClient(dataViewMode, publishScope);
client.WithContext(_apiContext);
response= client.Execute();
}
示例10: DeleteProductVariation
/// <summary>
/// Deletes a variation, based on the supplied variation key, for the specified product code.
/// </summary>
/// <param name="productCode">Merchant-created code that uniquely identifies the product such as a SKU or item number. Once created, the product code is read-only.</param>
/// <param name="variationKey">System-generated key that represents the attribute values that uniquely identify a specific product variation.</param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var productvariation = new ProductVariation();
/// productvariation.DeleteProductVariation(dataViewMode, productCode, variationKey);
/// </code>
/// </example>
public virtual void DeleteProductVariation(DataViewMode dataViewMode, string productCode, string variationKey)
{
MozuClient response;
var client = Mozu.Api.Clients.Commerce.Catalog.Admin.Products.ProductVariationClient.DeleteProductVariationClient(dataViewMode, productCode, variationKey);
client.WithContext(_apiContext);
response= client.Execute();
}
示例11: DeleteProperty
/// <summary>
/// Deletes the configuration of a property attribute for the product specified in the request.
/// </summary>
/// <param name="attributeFQN">The fully qualified name of the attribute, which is a user defined attribute identifier.</param>
/// <param name="productCode"></param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var productproperty = new ProductProperty();
/// productproperty.DeleteProperty(dataViewMode, productCode, attributeFQN);
/// </code>
/// </example>
public virtual void DeleteProperty(DataViewMode dataViewMode, string productCode, string attributeFQN)
{
MozuClient response;
var client = Mozu.Api.Clients.Commerce.Catalog.Admin.Products.ProductPropertyClient.DeletePropertyClient(dataViewMode, productCode, attributeFQN);
client.WithContext(_apiContext);
response= client.Execute();
}
示例12: DeleteDocument
/// <summary>
/// Deletes a specific document based on the specified document ID.
/// </summary>
/// <param name="documentId">Identifier of the document being deleted.</param>
/// <param name="documentListName">The name of the document list associated with the document list being deleted.</param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var document = new Document();
/// document.DeleteDocument(dataViewMode, documentListName, documentId);
/// </code>
/// </example>
public virtual void DeleteDocument(DataViewMode dataViewMode, string documentListName, string documentId)
{
MozuClient response;
var client = Mozu.Api.Clients.Content.Documentlists.DocumentClient.DeleteDocumentClient(dataViewMode, documentListName, documentId);
client.WithContext(_apiContext);
response= client.Execute();
}
示例13: DeleteDocumentDrafts
/// <summary>
/// Deletes the drafts of the specified documents. Published documents cannot be deleted.
/// </summary>
/// <param name="documentLists">List of document lists that contain documents to delete.</param>
/// <param name="documentIds">Unique identifiers of the documents to delete.</param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var documentdraftsummary = new DocumentDraftSummary();
/// documentdraftsummary.DeleteDocumentDrafts(dataViewMode, documentIds, documentLists);
/// </code>
/// </example>
public virtual void DeleteDocumentDrafts(DataViewMode dataViewMode, List<string> documentIds, string documentLists = null)
{
MozuClient response;
var client = Mozu.Api.Clients.Content.DocumentDraftSummaryClient.DeleteDocumentDraftsClient(dataViewMode, documentIds, documentLists);
client.WithContext(_apiContext);
response= client.Execute();
}
示例14: GetLocationInventories
/// <summary>
/// Retrieves a list of all product inventory definitions for the location code specified in the request.
/// <example>
/// <code>
/// var result = LocationInventoryFactory.GetLocationInventories(handler : handler, locationCode : locationCode, startIndex : startIndex, pageSize : pageSize, sortBy : sortBy, filter : filter, filterFunctions : filterFunctions, responseFields : responseFields, dataViewMode: dataViewMode, expectedCode: expectedCode, successCode: successCode);
/// var optionalCasting = ConvertClass<LocationInventoryCollection/>(result);
/// return optionalCasting;
/// </code>
/// </example>
/// </summary>
public static Mozu.Api.Contracts.ProductAdmin.LocationInventoryCollection GetLocationInventories(ServiceClientMessageHandler handler,
string locationCode, int? startIndex = null, int? pageSize = null, string sortBy = null, string filter = null, string filterFunctions = null, string responseFields = null, DataViewMode dataViewMode= DataViewMode.Live,
HttpStatusCode expectedCode = HttpStatusCode.OK, HttpStatusCode successCode = HttpStatusCode.OK)
{
SetSdKparameters();
var currentClassName = System.Reflection.MethodInfo.GetCurrentMethod().DeclaringType.Name;
var currentMethodName = System.Reflection.MethodBase.GetCurrentMethod().Name;
Debug.WriteLine(currentMethodName + '.' + currentMethodName );
var apiClient = Mozu.Api.Clients.Commerce.Catalog.Admin.LocationInventoryClient.GetLocationInventoriesClient(
locationCode : locationCode, startIndex : startIndex, pageSize : pageSize, sortBy : sortBy, filter : filter, filterFunctions : filterFunctions, responseFields : responseFields, dataViewMode: dataViewMode );
try
{
apiClient.WithContext(handler.ApiContext).Execute();
}
catch (ApiException ex)
{
// Custom error handling for test cases can be placed here
Exception customException = TestFailException.GetCustomTestException(ex, currentClassName, currentMethodName, expectedCode);
if (customException != null)
throw customException;
return null;
}
return ResponseMessageFactory.CheckResponseCodes(apiClient.HttpResponse.StatusCode, expectedCode, successCode)
? (apiClient.Result())
: null;
}
示例15: DeleteDiscount
/// <summary>
/// Deletes a discount specified by its discount ID.
/// </summary>
/// <param name="discountId">Unique identifier of the discount. System-supplied and read-only.</param>
/// <returns>
///
/// </returns>
/// <example>
/// <code>
/// var discount = new Discount();
/// discount.DeleteDiscount(dataViewMode, discountId);
/// </code>
/// </example>
public virtual void DeleteDiscount(DataViewMode dataViewMode, int discountId)
{
MozuClient response;
var client = Mozu.Api.Clients.Commerce.Catalog.Admin.DiscountClient.DeleteDiscountClient(dataViewMode, discountId);
client.WithContext(_apiContext);
response= client.Execute();
}