YAFLogo

Boskone
  • Boskone
  • 100% (Exalted)
  • YAF MVP Topic Starter
13 years ago
I have been trying to put together a better way to sync the roles between DNN and YAF.

I would like to create a schedualed task in DNN to do this.

I have an example code block from the Events module.

Namespace DotNetNuke.Modules.Events
    Public Class EventNotification
        Inherits DotNetNuke.Services.Scheduling.SchedulerClient

#Region "Constructors"
        Public Sub New(ByVal objScheduleHistoryItem As DotNetNuke.Services.Scheduling.ScheduleHistoryItem)
            MyBase.new()
            Me.ScheduleHistoryItem = objScheduleHistoryItem
        End Sub
#End Region

#Region "Methods"
        Public Overrides Sub DoWork()
            Try
            ...
            ...

I am having trouble converting the "Constructor" part in C#.

If anyone could help me convert it to C# code, I would greatly appreciate it.

Thanks.


Boskone - A DotNetNuke user.

RDSCC 

Sponsor

Mek
  • Mek
  • 100% (Exalted)
  • YAF Developer
13 years ago
Is it not something like this:


public class EventNotification : DotNetNuke.Services.Scheduling.SchedulerClient
{
    public EventNotification(DotNetNuke.Services.Scheduling.ScheduleHistoryItem objScheduleHistoryItem)
    {
        base();
        this.ScheduleHistoryItem = objScheduleHistoryItem;
    }

    public override DoWork()
    {
        // Do some stuff
    }
}

UserPostedImage

"It's a case of RTFM.. the only problem being we don't have a manual!"

When I post FP:Mek in a topic, I'm leaving my footprint there so I can track it once I get into coding/supporting. (Yes I stole this off Ederon 🙂 )

Boskone
  • Boskone
  • 100% (Exalted)
  • YAF MVP Topic Starter
13 years ago
Thanks Mek
Boskone - A DotNetNuke user.

RDSCC