I am trying to change some custommessage encoder Using this blog
http://www.falconwebtech.com/post/2010/05/24/WCF-Interoperability-and-Extensibility-Part-Two.aspx
Here the author uses a extension method
xmlMessage.Descendants(sec + "Security").First().Add(samlXml);
What namespace do I use for this .First This is the error I am getting
'System.Collections.Generic.IEnumerable' does not contain a definition for 'First' and no extension method 'First' accepting a first argument of type 'System.Collections.Generic.IEnumerable' could be found (are you missing a using directive or an assembly reference?)
I have the following namespaces included
using System;
using System.IO;
using System.Security.Cryptography;
using System.ServiceModel.Channels;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using System.Reflection;
using System.Collections.Generic;
using System.Xml.XPath;
using System.Security.Cryptography.Xml;
using System.Security.Cryptography.X509Certificates;
using Microsoft.Web.Services3.Security;
using System.ServiceModel.Security;
using System.IdentityModel.Tokens;
I could've done my research but I am taking the easy way
Thank you
System.Linq
is the one you're after.
http://msdn.microsoft.com/en-us/library/system.linq.enumerable.first.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With