Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,555,395
Community Members
 
Community Events
184
Community Groups

How to pass an interface parameter to a method of a service instance implement that interface

Edited

I have a library project which has:

1. An Interface:

public interface IManageApplicationServiceInterface : IProcessQ<IManageApplicationServiceEntity>
{
void createIA(IManageApplicationServiceEntity serviceEntity);
}

2. A service class that implement the interface above:

[Export(typeof(IProcessQ))]
[ProcessMetaData("My API Service Interface", "9ECBE30E-ECA2-4F1B-B511-AF688E0AEA05",
PluginType.ServiceInterface, typeof(IManageApplicationServiceEntity))]

public class ManageApplicationServiceInterface : IManageApplicationServiceInterface
{
/// <summary>
///
/// </summary>
/// <param name="entity"></param>
public void Execute(IEntity entity)
{
throw new NotImplementedException();
}

/// <summary>
///
/// </summary>
/// <param name="serviceEntity"></param>
public void Execute(IManageApplicationServiceEntity serviceEntity)
{
throw new NotImplementedException();
}

/// <summary>
/// Front End should supply the input json.
/// </summary>
/// <param name="requestData"></param>
public void createMyApp(IManageApplicationServiceEntity applicationData)
{
try
{
Logger.Debug("Start creating my app method");
Logger.Debug("End creating my app method");
}
catch (Exception ex)
{
Logger.Error("Expection in Create MyApp method - " + ex);
throw ex;
}
}

I'm going to call createMyApp web service method from a web console or a web application. I used a web application to call it.

IManageApplicationServiceEntity manageApplicationServiceInterface;
ds.createMyApp(manageApplicationServiceInterface);

Hover on ds.create Visual Studio says "Front End should supply the input json" and hover on the interface variable it says: "Used unassigned local variable 'manageApplicationServiceInterface' "

How can I pass the parameter to call the method createMyApp?

Hope get help from community.

Many appreciate! 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events