In WCF some of the settings are written as class attributes. I would like to set them in the configuration file instead.
Examples
[OperationContract(IsOneWay = true)]
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Multiple)]
Is there any way to do this? Maybe with MicroKernel/...
I rarely work with xslt's so I'm not the greatest at it, but, I was wondering how to go about solving this problem:
<Element>
<childElement type="type1">Bob</childElement>
<childElement type="type1">Smith</childElement>
<childElement type="type2">Bob</childElement>
</Element>"
I want to enforce @type uniqueness, where I would...
I want to be able to create a top-level Team site. On that site, I want to add sub-sites and below those sites, 1..n sub-sites to hold project level information. On the bottom level sites, it would be very helpful to be able to store custom attributes about each project (Business Areas, Categories, Start/End Dates, etc.). The owners of e...
I'm writing a user control with two attributes, A and B. I want the programmer using this control to be warned when defining a value for attribute A but not for B.
Can I accomplish this somehow?
...
Hello,
I'm just starting to get into JQuery so I apologize in advance if this is a simple question.
I'm working with the A List Apart article on Print Previews to try to get live Print Previews in the webapp that I'm working on. I've gotten it to work satisfactorily but I'm now trying to refactor my code to what I think it should look...
Hello,
I just started playing about with emacs yesterday for a project I'm working on. Anyway, i've started using the nxhtml-mumamo for web dev work and have got everything working alright except for when an HTML attribute contains is written as such...
<element attribute="<?= _ID ?>"></element>
... which invalidates the source.
I've...
If I apply attributes to a partial class via the MetadataType attribute, those attributes are not found via Attribute.IsDefined(). Anyone know why, or what I'm doing wrong?
Below is a test project I created for this, but I'm really trying to apply custom attributes to a LINQ to SQL entity class - like this answer in this question.
Tha...
I have found that my WCF services work normally when the data types involved doesn't have the [DataContract], but the [Serializable] instead.
But all the WCF tutorials shows the first one instead of the latter. Why?
...
I'm trying to write an if statement where if one of the elements has it's display set to "none", I want the parent element to also display "none"...
This is the code I'm trying, which doesn't work...
/* tried this first */
if($('#prevx a').attr('display') == 'none') {
$(this).parent().attr('display','none');
}
/* and then this *...
I want to use XSL to convert XML to another XML
The input xml contains the following element
<ViewSideIndicator>0</ViewSideIndicator>
which need to be converted to the following
<ImageViewDetail ViewSideIndicator="Front"/>
in the input file, if the value is "0", then it should be "Front" in the output
and if the value is "1", then...
I want to declare two classes that are associated, therefore I am declaring them together linked by an 'and'. Each has different attributes but this code is not working ("Unexpected keyword 'and' in definition" error at keyword 'and'. How should I declare the attributes of the second class?
[<AbstractClass>]
type foo() =
abstract memb...
I have a [Logger] attribute for my asp.net-mvc projects.
This LoggerAttribute takes a ILoggerService in it's constructor.
For regular objects (e.g. my controllers) it works, but attributes don't seem to be resolved.
How can I have Turbine inject the ILoggerService?
...
How can i define an boolean attribute that can be set "true" only in one element.
Following snippet must be invalid.
<products>
<product featured="yes">Prod 1</product>
<product featured="yes">Prod 2</product>
</products>
...
This subject turned into a heated discussion at the office, so I'm interested to learn what you think.
We are working on a web app that only targets some specific browsers. These browsers presently include different flavors Opera 9 and Mozilla 1.7.12. In the future we likely also have to support Opera 10 and different flavors of WebKit....
I have some simple POCO object:
public class ProductCategoryDTO
{
public string Name { get; set; }
public DateTime ModifiedDate { get; set; }
}
As sometimes field order is important (for example, if sending to Infopath forms), I need to keep element order when serializing.
And now I am confused, what attributes I shou...
public class SndFx
{
[Embed(source="Sounds/01.mp3")]
public static const s01:Class;
public static const s01s:Sound = new s01() as Sound;
[Embed(source="Sounds/02.mp3")]
public static const s02:Class;
public static const s02s:Sound = new s02() as Sound;
[etc...]
}
Can I access these attributes dynamically? I've got a number of ...
I would like to know if I can define custom assembly attributes. Existing attributes are defined in the following way:
[assembly: AssemblyTitle("MyApplication")]
[assembly: AssemblyDescription("This application is a sample application.")]
[assembly: AssemblyCopyright("Copyright © MyCompany 2009")]
Is there a way I can do the foll...
I have a method that is only accessible if a certain criteria is fulfilled, if it's not, then the method won't be executed. Currently, this is how I code the thing:
public void CanAccessDatabase()
{
if(StaticClass.IsEligible())
{
return;
}
// do the logic
}
Now, this code is ugly because out of no where there is this...
Hi,
I am using SAX api in java to convert csv to xml. I can generate simple xml file without attribute like
<item>
<item_id>1500</item_id>
<item_quantity>4</item_quantity>
</item>
but I can't find way to set id and quanity as attribute to item element, like
<item id=1500 quantity=4/>
All SAX aip seem to offer is startElement, c...
Hello,
I have an XML document format from a legacy system that I have to support in a future application. I want to be able to both serialize and deserialize the XML between XML and C# objects, however, using the objects generated by xsd.exe, the C# serialization includes the xmlns:xsi..., xsi:... etc XML attributes on the root element...