Boskone
  •  Boskone
  • 100% (Exalted)
  • YAF MVP Topic Starter
2009-05-01T12:29:15Z
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
2009-05-02T01:21:22Z
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
2009-05-02T03:18:13Z
Thanks Mek
Boskone - A DotNetNuke user.
RDSCC 

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved