Microsoft® Surface® Live Stream Code Sample

ive Stream enables businesses to engage their customers face-to-face using the most recent and relevant Twitter™, Flickr®, and RSS newsfeeds.

C# (5.9 MB)
 
 
 
 
 
4.3 Star
(4)
6,628 times
Add to favorites
4/19/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="LiveStream.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    </sectionGroup>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="LiveStream.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
    defaultCategory="General" logWarningsWhenNoCategoriesMatch="false">
    <listeners>
      <add fileName="C:\Users\Public\Microsoft Surface Live Stream\Logs\Crashes.log"
        header="" footer="" formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        name="Flat File Trace Listener (Crashes)" />
      <add fileName="C:\Users\Public\Microsoft Surface Live Stream\Logs\General.log"
        header="" footer="" formatter="Text Formatter" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        name="Flat File Trace Listener (General)" />
    </listeners>
    <formatters>
      <add template="Timestamp: {timestamp}&#xD;&#xA;Message: {message}&#xD;&#xA;Category: {category}&#xD;&#xA;Priority: {priority}&#xD;&#xA;EventId: {eventid}&#xD;&#xA;Severity: {severity}&#xD;&#xA;Title:{title}&#xD;&#xA;Machine: {machine}&#xD;&#xA;Application Domain: {appDomain}&#xD;&#xA;Process Id: {processId}&#xD;&#xA;Process Name: {processName}&#xD;&#xA;Win32 Thread Id: {win32ThreadId}&#xD;&#xA;Thread Name: {threadName}&#xD;&#xA;Extended Properties: {dictionary({key} - {value}&#xD;&#xA;)}"
        type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        name="Text Formatter" />
    </formatters>
    <categorySources>
      <add switchValue="All" name="Crash">
        <listeners>
          <add name="Flat File Trace Listener (Crashes)" />
        </listeners>
      </add>
      <add switchValue="All" name="General">
        <listeners>
          <add name="Flat File Trace Listener (General)" />
        </listeners>
      </add>
    </categorySources>
    <specialSources>
      <allEvents switchValue="All" name="All Events">
        <listeners>
          <add name="Flat File Trace Listener (General)" />
        </listeners>
      </allEvents>
      <notProcessed switchValue="All" name="Unprocessed Category">
        <listeners>
          <add name="Flat File Trace Listener (General)" />
        </listeners>
      </notProcessed>
      <errors switchValue="All" name="Logging Errors &amp; Warnings">
        <listeners>
          <add name="Flat File Trace Listener (General)" />
        </listeners>
      </errors>
    </specialSources>
  </loggingConfiguration>
  <userSettings>
    <LiveStream.Properties.Settings>
      <setting name="Volume" serializeAs="String">
        <value>1</value>
      </setting>
      <setting name="AutoScrollSpeed" serializeAs="String">
        <value>84</value>
      </setting>
      <setting name="IsProfanityFilterEnabled" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="RetrievalOrder" serializeAs="String">
        <value>Chronological</value>
      </setting>
      <setting name="FlickrBans" serializeAs="String">
        <value />
      </setting>
      <setting name="TwitterBans" serializeAs="String">
        <value />
      </setting>
      <setting name="NewsBans" serializeAs="String">
        <value />
      </setting>
    </LiveStream.Properties.Settings>
  </userSettings>
  <applicationSettings>
    <LiveStream.Properties.Settings>
      <setting name="ThemeColor" serializeAs="String">
        <value>#FFBD2C7C</value>
      </setting>
      <setting name="ItemTimeoutFront" serializeAs="String">
        <value>00:00:15</value>
      </setting>
      <setting name="FlickrPollInterval" serializeAs="String">
        <value>00:20:00</value>
      </setting>
      <setting name="TwitterQuery" serializeAs="String">
        <value>microsoft,#ms,!lnk.ms,msft,#surface,@surface</value>
      </setting>
      <setting name="FlickrQuery" serializeAs="String">
        <value>microsoft surface</value>
      </setting>
      <setting name="NewsQuery" serializeAs="String">
        <value>http://blogs.msdn.com/b/surface/rss.aspx</value>
      </setting>
      <setting name="ItemTimeoutBack" serializeAs="String">
        <value>00:00:45</value>
      </setting>
      <setting name="MinFeedItemDate" serializeAs="String">
        <value>1970-01-01</value>
      </setting>
      <setting name="TwitterPollInterval" serializeAs="String">
        <value>00:10:00</value>
      </setting>
      <setting name="NewsPollInterval" serializeAs="String">
        <value>00:05:00</value>
      </setting>
      <setting name="ForegroundColor" serializeAs="String">
        <value>#FFFFFFFF</value>
      </setting>
      <setting name="MinNewsSize" serializeAs="String">
        <value>325,270</value>
      </setting>
      <setting name="MaxNewsSize" serializeAs="String">
        <value>460,370</value>
      </setting>
      <setting name="MinStatusSize" serializeAs="String">
        <value>350,235</value>
      </setting>
      <setting name="MaxStatusSize" serializeAs="String">
        <value>350,235</value>
      </setting>
      <setting name="MinImageSize" serializeAs="String">
        <value>275,275</value>
      </setting>
      <setting name="MaxImageSize" serializeAs="String">
        <value>500,500</value>
      </setting>
      <setting name="VisualizationColor" serializeAs="String">
        <value>#FFFF00FF</value>
      </setting>
      <setting name="DistributeContentEvenly" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="NewItemAlert" serializeAs="String">
        <value>01:00:00</value>
      </setting>
      <setting name="AdminByteTag" serializeAs="String">
        <value>255</value>
      </setting>
      <setting name="TweetOpacity" serializeAs="String">
        <value>0.4</value>
      </setting>
      <setting name="NewsOpacity" serializeAs="String">
        <value>0.4</value>
      </setting>
      <setting name="AdminTimeoutDelay" serializeAs="String">
        <value>00:05:00</value>
      </setting>
      <setting name="EnableContentResizing" serializeAs="String">
        <value>False</value>
      </setting>
    </LiveStream.Properties.Settings>
  </applicationSettings>
  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IMIBPContract" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32768" maxStringContentLength="32768" maxArrayLength="32768" maxBytesPerRead="32768" maxNameTableCharCount="32768" />
          <security mode="Transport">
            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
        <binding name="BasicHttpBinding_IMIBPContract1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="None">
            <transport clientCredentialType="None" proxyCredentialType="None" realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="https://ws.tag.microsoft.com/Service.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IMIBPContract" contract="MicrosoftTagService.IMIBPContract" name="BasicHttpBinding_IMIBPContract" />
    </client>
  </system.serviceModel>
  <runtime>
    <generatePublisherEvidence enabled="false" />
  </runtime>
</configuration>