« first day (1680 days earlier)      last day (3254 days later) » 

12:39 AM
Its "DEAD INSIDE" here
 
 
9 hours later…
9:42 AM
@BradleyDotNET: Why? Not a fan of operator overrides?
 
10:22 AM
I am pleased by hearing that Open Source is in longterm roadmap: youtube.com/watch?v=I6SU7UTaA3E
 
11:09 AM
0
Q: C# : How to manage captured variables in threading

ElaheLook at this sample code : private void StartProgram() { for (int i = 0; i < 10; i++) { if (true) // some conditions { int Temp = i; // every thread has different memory location for Temp variable. ...

 
hello
I want to make a offline chat application in my asp.net website
I have a table "message" which store data and also the id of users
I am confused how I could implement it as the scenario is "Admin could send message to all users while users could send message to admin only"
 
11:25 AM
Hi guys .. I am trying to use log4net and want to log data in file, but not able to do so
I'm using NHibernate and have put all the necessary Configuration in App.Config
its a simple WinApp for testing purpose so that i can include log4net in my main project
I have even asked this @ : stackoverflow.com/questions/30410493/…
 
12:06 PM
@Sadiq The section here titled 'How do I enable log4net internal debugging?' might help. If it isn't able to log, you might be able to see an error message. If you've misconfigured it to not log anything, you should be able to see that too
^ never tried
Aah. Hang on. IIRC Windows doesn't let applications write to any location under Program Files. log.txt will be assumed to be a path relative to the application executable, I think
Although you never said it was in Program Files. Still, write permissions may be an issue
 
 
4 hours later…
4:35 PM
@scheien If someone tries to override ! on anything other than a bool, I would be very sad
most unary operators don't make a ton of sense outside their original context
that's all
 
5:17 PM
hello folks .. whats the best way to implement security in web api 2
 
@BradleyDotNET: I see what you mean. Probably someone out there who thinks it would be a great idea though. (hope I don't into something like that)
 
5:51 PM
^ anyone calling themselves 'architect' should ensure they are not in conflict with anything that document says
 
6:06 PM
@TomW THanks its done
 
6:26 PM
@TomW what is a backing service?
 
6:38 PM
@JohanLarsson (database, queue, memory cache, etc).
 
ty ty
 
hey
still having trouble registering my class that takes a dependency in it's constructor. I've posted a question on it if any of you can advise on it:
0
Q: How to register a class with a dependency injected constructor? (SimpleIoC)

Brian JI'm using MVVM Light in my project, but I'm not sure how to register a Viewmodel class in the ViewModelLocator class that takes a parameter in it's constructor. I've looked through the docs on IoC but don't see anything relating to registering a class with a dependency injected constructor, ie t...

 
IEnumerable<ScoreModel> is probably a poor fit for IoC
ScoreModels : IEnumerable<ScoreModel> maybe
the answer looks good.
I have never used SimpleIoC
 
okay
trying to get my head around that ^
the list being injected is of type ScoreModel and being sent from the MainVM
 
also error message looks pretty good
 
6:45 PM
While I agree that a collection itself wouldn't IoC, a class that takes one certainly could be
 
take one meaning having IEnumerable<ScoreModel> as ctro arg?
 
right
Deriving from IEnumerable means you are probably doing it wrong.
 
deriving meaning implementing as in: ScoreModels : IEnumerable<ScoreModel>?
 
I'm a bit lost to put it lightly as to implementing this
 
maybe you can play with some simpler toy stuff first?
IoC containers are not hard but a bit ~magic.
 
6:49 PM
right
 
Not hard as in the API for them is pretty small
@BradleyDotNET which one?
 
deriving = implementing for interfaces
 
okay so what would be my alternative here? Scrap the ViewModelLocator in place of what?
 
Ok ScoreModels : IEnumerable<ScoreModel> is pretty standard in Sweden
 
That just screams "prefer composition to inheritance" to me
but thats just me
@BrianJ Perhaps try writing your own IoC container (service locator)
then you can learn how they work, and will understand the magic of 3rd party ones
 
6:53 PM
yeah that's an option I guess
@JohanLarsson do you mean I should have a ScoreModels interface?
 
No, thats not what he means at all
 
okay I'm not too sure then
 
A lot of times 3rd party IoC also use some DI library, so its like magic on top of magic
makes it even harder to understand
 
so the DI I'm setting up manually is probably already available to set up in the IoC
I'm guessing
 
something like that
Here's an example of a really simple IoC container/service locator (I like writing my own :) )
Now, there are plenty of potential issues with that code, but its a good starting point, and when I'm the only dev, I can afford to have a few holes!
 
7:00 PM
yeah what I might do is just scrap the VMLocator, and set up the data contexts for the Views manually
 
you still have to pass the data around though
but yes, that is also an option
 
hmmm other option the is writing an IoC from scratch going off your example
to clarify, the IoC handles the data context also
?
 
IoC is just a pattern
totally unrelated to the concept of a "data context"
so you can certainly retrieve a data context from an IoC container
but no, its not going to automatically handle anything
certain frameworks do combine the concepts
but its not part of either pattern
 
okay
what is the standard way of setting the data context for my Views then?
like without thinking about this IoC pattern
 
There is no truly standard way
There are 3 accepted ways:
in the view constructor
directly in XAML
through a data template on the main view
various devs prefer one over the other
I like (2) except you can't do parameters very easily
 
7:04 PM
okay
might go for option 1
 
Easily the simplest
(3) sounds very appealing to me, but haven't got around to trying it much yet :)
 
yeah just thinking that deleting the locator is gonna cause problems
but will have to deal with it
shouldn't be too hard to set up
 
^^ problem caused by starting with a framework
 
in the constructor, I think I came across it before in the last project
 
Understand your magic, all the time, every time
2
 
7:05 PM
Brb in 20 mins, gotta help someone
 
7:31 PM
okay so, if I go ahead and set up the data context in the View constructor, would it still be feasible to wire in the IoC container like yours after
 
gonna try that then :)
in this case I need to create an instance of the VM, and set the data context in the View's constructor:

this.DataContext = ViewModel;
from what I remember
 
right
 
7:47 PM
That should then allow me to delete the data context in the xaml
DataContext="{Binding MainPage,
                            Source={StaticResource Locator}}"
 
Correct
 
cool gonna try phasing out the Locator then using that approach
 
8:00 PM
so I've removed all the xaml data context set up, and replaced it with the code behind data context set up. Deleted the VMLocator and the resource point to the locator in the App.xaml. Everything still seems to be working so far
 
8:19 PM
just wondering now, How I can bind my ListView to the Observable collection? It has two fields a Subject and a Points
think I read somewhere that a data template should be used for that case
 
8:36 PM
Yep
 
9:20 PM
0
Q: Redirect to a page without Query String using Re-write module in asp.net

Ram SinghI have to create a Re-write Rule which will redirect a URL as below abc.com/ssss/aaaaa/fff.aspx/?homeredirect=ture to abc.com/ssss/aaaaa/fff.aspx abc.com/fff.aspx/?homeredirect=ture to abc.com/fff.aspx i am not getting how i can go for this. i have tried the below one, but it didn't wo...

please help me
 
9:57 PM
okay thanks @BradleyDotNET managed to find a solution on the binding set up, but the list view is blank and not giving a binding error in the output window. I posted a question on it. Can't think of any obvious reason why it's showing empty.
0
Q: How to bind an Observable Collection to a ListView

Brian JI've set up the binding of a ListView following this example, binding to observable collection but when I run the application the collection values aren't displayed in the ListView. The output window isn't throwing any binding errors, so not sure what the binding error could be. Also I've set a ...

 
 
1 hour later…
11:21 PM
Do what the comment said
 

« first day (1680 days earlier)      last day (3254 days later) »