📄 adrotator.cs
字号:
using System;
namespace System.Web.UI.WebControls
{
/// <summary>
/// Summary description for AdRotator.
/// </summary>
public class AdRotator
{
private struct AdRec
{
public System.Collections.IDictionary adProperties;
public int impressions;
public string keyword;
}
static AdRotator()
{
// AdRotator.EventAdCreated = new Object();
}
public AdRotator() : base()
{
}
protected virtual ControlCollection CreateControlCollection()
{
throw new Exception("TODO");
// return new EmptyControlCollection(this);
}
private AdRec[] GetFileData(string fileName)
{
throw new Exception("To be supplied.");
}
private System.Web.UI.WebControls.AdRotator.AdRec[] LoadFile(string fileName)
{
throw new Exception("todo");
// Stream local0;
// AdRec[] local1;
// Exception local2;
// ArrayList local3;
// XmlReader local4;
// XmlDocument local5;
// XmlNode local6;
// IDictionary local7;
// XmlNode local8;
// int local9;
// int local10;
// Exception local11;
//
// local0 = null;
// local1 = null;
// try
// {
// local0 = new FileStream(fileName, 3, 1, 1);
// }
// catch (Exception local2)
// {
// throw new HttpException(System.Web.HttpRuntime.FormatResourceString("AdRotator_cant_open_file", this.ID, local2.Message));
// }
// try
// {
// try
// {
// local3 = new ArrayList();
// local4 = new XmlTextReader(local0);
// local5 = new XmlDocument();
// local5.Load(local4);
// if (local5.DocumentElement != null && System.String.op_Equality(local5.DocumentElement.LocalName, "Advertisements"))
// {
// local6 = local5.DocumentElement.FirstChild;
// while (local6 != null)
// {
// local7 = null;
// if (local6.LocalName == "Ad")
// {
// local8 = local6.FirstChild;
// while (local8 != null)
// {
// if (local8.NodeType == 1)
// {
// if (local7 == null)
// local7 = new HybridDictionary();
// local7.Add(local8.LocalName, local8.InnerText);
// }
// local8 = local8.NextSibling;
// }
// }
// if (local7 != null)
// local3.Add(local7);
// local6 = local6.NextSibling;
// }
// }
// if (local3.Count != 0)
// {
// local1 = new AdRec[checked((uint) local3.Count)];
// local9 = 0;
// local10 = 0;
// while (local10 < local3.Count)
// {
// if (local3.get_Item(local10) != null)
// {
// local1[local9].Initialize((IDictionary) local3.get_Item(local10));
// local9++;
// }
// local10++;
// }
// }
// }
// catch (Exception local11)
// {
// throw new HttpException(System.Web.HttpRuntime.FormatResourceString("AdRotator_parse_error", this.ID, this.AdvertisementFile, local11.Message), local11);
// }
// }
// finally
// {
// if (local0 == null)
// goto i-1;
// local0.Close();
// }
// if (local1 == null)
// throw new HttpException(System.Web.HttpRuntime.FormatResourceString("AdRotator_no_advertisements", this.ID, this.AdvertisementFile));
// return local1;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -