C# Not sure how code works

Hi
I am new to C#, having used VB.net for 8 years.
I am not quite sure how the following sort of code is used

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.Data;

namespace Xtractor
{
   [ServiceContract]
   public interface IXtractorService
   {
      [OperationContract]
      DataSet GetFunctionModuleTemplate(String destinationName, String functionModuleName);

      [OperationContract]
      DataSet GetReadTableFunctionModuleTemplate(String destinationName);

      [OperationContract]
      DataSet GetReadTableResultDataSetBase(String destinationName, String tableName, Boolean suppressData);

      [OperationContract]
      DataSet GetReadTableResultDataSet1RowSkips1String(String destinationName, String tableName, int rowCount, int rowSkips);

      [OperationContract]
      DataSet GetReadTableResultDataSetRowSkips2String(String destinationName, String tableName, String fieldNameString, int rowCount, int rowSkips);

      [OperationContract]
      DataSet GetReadTableResultDataSetRowSkips3String(String destinationName, String tableName, String pkFieldNameString, String fieldNameString, int rowCount, int rowSkips);

      [OperationContract]
      DataSet GetReadTableResultDataSetRowSkips3List(String destinationName, String tableName, List<String> pkFieldNameList, List<String> fieldNameList, int rowCount, int rowSkips);

      [OperationContract]
      DataSet GetReadTableResultDataSetWhere1String(String destinationName, String tableName, int rowCount, String whereClause);

      [OperationContract]
      DataSet GetReadTableResultDataSetWhere2String(String destinationName, String tableName, String fieldNameString, int rowCount, String whereClause);

      [OperationContract]
      DataSet GetReadTableResultDataSetWhere3String(String destinationName, String tableName, String pkFieldNameString, String fieldNameString, int rowCount, String whereClauseString);

      [OperationContract]
      DataSet GetReadTableResultDataSetWhere3List(String destinationName, String tableName, List<String> pkFieldNameList, List<String> fieldNameList, int rowCount, List<String> whereClauseList);

      [OperationContract]
      DataSet GetReadTableResultDataSetFull1String(String destinationName, String tableName, String pkFieldNameList, String fieldNameList, int rowCount, int rowSkips, String whereClauseString, Boolean suppressData);

      [OperationContract]
      DataSet GetReadTableResultDataSetFull1List(String destinationName, String tableName, List<String> pkFieldNameList, List<String> fieldNameList, int rowCount, int rowSkips, List<String> whereClauseList, Boolean suppressData);

      //[OperationContract]
      //DataSet GetTableEntriesFunctionModuleTemplate(String destinationName);

      //[OperationContract]
      //DataSet GetTableEntriesResultDataSet(String destinationName, String tableName, String whereClause);

      [OperationContract]
      DataSet CallFunctionModule(String destinationName, DataSet requestDataSet);

      //[OperationContract]
      //DataSet GetIDocMetaData(String destinationName, String basicIDocType, string extIDocType, String release);

      [OperationContract]
      int CreateSync(DataSet dataSet);

      [OperationContract]
      void UpdateSync(int syncId, DataSet dataSet);

      [OperationContract]
      DataSet LoadSyncDataSet(int syncId, String dataSetName);

      [OperationContract]
      DataSet LoadSyncDataSetDataTable(int syncId, String dataSetName, String dataTableName);

      [OperationContract]
      DataSet LoadSyncDataSetDataTableFromMaxItems(int syncId, String dataSetName, String dataTableName, String pkFieldsFrom, int maxItems);

      [OperationContract]
      DataSet LoadSyncDataSetDataTableFromTo(int syncId, String dataSetName, String dataTableName, String pkFieldsFrom, String pkFieldsTo);

      [OperationContract]
      DataSet GetDataDictionary(String destinationName, String tableName);

      [OperationContract]
      String GetCreateTableSqlBase(String destinationName, String tableName);

      [OperationContract]
      String GetCreateTableSql1String(String destinationName, String tableName, String fieldNameString);

      [OperationContract]
      String GetCreateTableSql2String(String destinationName, String tableName, String pkFieldNameString, String fieldNameString);

      [OperationContract]
      String GetCreateTableSql1List(String destinationName, String tableName, List<String> fieldNameList);

      [OperationContract]
      String GetCreateTableSql2List(String destinationName, String tableName, List<String> pkFieldNameList, List<String> fieldNameList);

   }

}

Open in new window

Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
AndyAinscowFreelance programmer / ConsultantCommented:
namespace Xtractor
{
   [ServiceContract]
   public interface IXtractorService


Roughly that is an interface (maybe template makes more sense to you).  You can base other classes on one or more interfaces.  The classes then must provide the code to implement the interfaces declared.

eg.
DataSet GetFunctionModuleTemplate(String destinationName, String functionModuleName);

A class based on this interface must have a function (method) called GetFunctionModuleTemplate which returns a DataSet and takes two string parameters.
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.