ProfileService class
Version Info: This topic applies to Episerver.ConnectForMarketingAutomation 4.0.0 and lower. For later versions, see Sample Connector - IMarketingConnector.
Interface for working with Profiles.
- Inheritance hierarchy.
System.Object DemoConnector.Services.ProfileService
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public class ProfileService : IProfileService
Constructor
Initializes a new instance of the ProfileService class.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public ProfileService()
Methods
ProfileService.AddProfileToList method
Adds the given profile to the given profile list.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public bool AddProfileToList( int listId, long profileId )
- Parameters.
- listId. Type: System. Int32
The list identifier. - profileId. Type: System. Int64
The profile identifier.
- listId. Type: System. Int32
- Return value. Type: Boolean
Result of adding profile to teh given list. - Implements. IProfileService.AddProfileToList(Int32, Int64)
ProfileService.CreateProfile method
Create new profile and add to a database which the profile expects.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public string CreateProfile( Profile newProfile )
- Parameters.
- newProfile. Type: Profile
The new profile data.
- newProfile. Type: Profile
- Return value. Type: String
The profile's Id string, a null if failed. - Implements. IProfileService.CreateProfile(Profile)
ProfileService.GetCurrentProfile method
Go through all sources and try to get the current profile.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public Profile GetCurrentProfile()
- Return value. Type: Profile
The current profile. - Implements. IProfileService.GetCurrentProfile()
ProfileService.GetCurrentProfileFromSource method
Get the current profile from the database ID.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public Profile GetCurrentProfileFromSource( int databaseId )
- Parameters.
- databaseId. Type: System. Int32
Always int.Min.
- databaseId. Type: System. Int32
- Return value. Type: Profile
The current profile from the given source. - Implements. IProfileService.GetCurrentProfileFromSource(Int32)
ProfileService.GetProfile method
Gets a profile by ID.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public Profile GetProfile( int databaseId, long profileId )
- Parameters.
- databaseId. Type: System. Int32
The database ID - profileId. Type: System. Int64
The profile identifier.
- databaseId. Type: System. Int32
- Return value. Type: Profile
A profile, or null if not found. - Implements. IProfileService.GetProfile(Int32, Int64)
ProfileService.OptInProfile method
Opt a profile in.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public bool OptInProfile( int databaseId, long profileId )
- Parameters.
- databaseId. Type: System. Int32
The database identifier. - profileId. Type: System. Int64
The profile identifier.
- databaseId. Type: System. Int32
- Return value. Type: Boolean
True if opt in success fully, otherwise false. - Implements. IProfileService.OptInProfile(Int32, Int64)
ProfileService.OptOutProfile method
Opt a profile out.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public bool OptOutProfile( int databaseId, long profileId )
- Parameters.
- databaseId. Type: System. Int32
The database identifier. - profileId. Type: System. Int64
The profile identifier.
- databaseId. Type: System. Int32
- Return value. Type: Boolean
True if opt out success fully, otherwise false. - Implements. IProfileService.OptOutProfile(Int32, Int64)
ProfileService.RemoveProfile method
Remove profile from the input database.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public bool RemoveProfile( int databaseId, long profileId )
- Parameters.
- databaseId. Type: System. Int32
The database identifier. - profileId. Type: System. Int64
The profile identifier.
- databaseId. Type: System. Int32
- Return value. Type: Boolean
True if remove success fully, otherwise false. - Implements. IProfileService.RemoveProfile(Int32, Int64)
ProfileService.UpdateProfile method
Update a profile with input fields need to update.
- Namespace. DemoConnector.Services
- Assembly. DemoConnector (in DemoConnector.dll) Version: 1.0.0.0
- C# syntax.
public bool UpdateProfile( int databaseId, long profileId, Dictionary<string, Object> fieldsToUpdate, bool addMissingColumns )
- Parameters.
- databaseId. Type: System. Int32
The database identifier. - profileId. Type: System. Int64
The profile identifier. - fieldsToUpdate. Type: System.Collections.Generic. Dictionary< String, Object>
Dictionary of fields need to update. - addMissingColumns. Type: System. Boolean
If set to true, synchronize columns with the database.
- databaseId. Type: System. Int32
- Return value. Type: Boolean
True if update success fully, otherwise false. - Implements. IProfileService.UpdateProfile(Int32, Int64, Dictionary<String, Object>, Boolean)
Last updated: Dec 10, 2015