Hi,
Yes, the event is not getting fired inside the function. I did put a breakpoint over there but the event is not fired.
Yes, the event is not getting fired inside the function. I did put a breakpoint over there but the event is not fired.
private static void Stream_UserStreamExample()
{
var userStream = Stream.CreateUserStream();
// Messages
EventsRelatedWithMessages(userStream); //I am using my application for Messages.
// User Update
userStream.LoggedUserProfileUpdated += (sender, args) =>
{
var newLoggedUser = args.LoggedUser;
Console.WriteLine("Logged user '{0}' has been updated!", newLoggedUser.Name);
};
// Friends the stream will analyze - A UserStream cannot analyze more than 10.000 people at the same time
userStream.FriendIdsReceived += (sender, args) =>
{
var friendIds = args.Value;
Console.WriteLine(friendIds.Count());
};
// Access Revoked
userStream.AccessRevoked += (sender, args) =>
{
Console.WriteLine("Application {0} had its access revoked!", args.Info.ApplicationName);
};
userStream.StartStream();
}
private static void EventsRelatedWithMessages(IUserStream userStream)
{
//These events didn't get fired when I send/receive Direct Messages.
userStream.MessageSent += (sender, args) => { Console.WriteLine("message '{0}' sent", args.Message.Text); };
userStream.MessageReceived += (sender, args) => { Console.WriteLine("message '{0}' received", args.Message.Text); };
}
Thanks