本文整理汇总了C#中Meta类的典型用法代码示例。如果您正苦于以下问题:C# Meta类的具体用法?C# Meta怎么用?C# Meta使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Meta类属于命名空间,在下文中一共展示了Meta类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetUp
public void SetUp()
{
_stub = new Stub { Int = 10, Str = "Str", Collection = new List<int> { 1, 2, 3 }, Array = new byte[10] };
_newStub = new Stub { Collection = new List<int> { 11, 12, 13 } };
_meta = new Meta { Int = 10, Str = "Str", Collection = new List<int> { 1, 2, 3 }, Array = new byte[10] };
_helper = new EditorHelper();
}
开发者ID:guozanhua,项目名称:phmi,代码行数:7,代码来源:EditorHelperTests.cs
示例2: ChessGameFromFEN
public void ChessGameFromFEN()
{
const string fenString = "rnbqkbnr/pppppppp/8/8/8/3P4/PPP1PPPP/RNBQKBNR w KQkq - 0 1";
var i = new Meta();
i["FEN"] = fenString;
var g = new ChessGame(i);
Assert.AreEqual(fenString, g.State.ToString());
}
开发者ID:Maniulo,项目名称:GameWarden,代码行数:8,代码来源:ChessGameTests.cs
示例3: ItemTest
public void ItemTest()
{
var i = new Meta();
i["Key"] = "Value";
i["Key2"] = "Value2";
Assert.AreEqual("Value", i["Key"]);
Assert.AreEqual("Value2", i["Key2"]);
}
开发者ID:Maniulo,项目名称:GameWarden,代码行数:8,代码来源:MetaTests.cs
示例4: HandleCommand
public void HandleCommand(IStore store, Meta.BSon.BSonDoc command)
{
if (command.HasProperty(CommandKeyword.Collection))
{
var cc = store.GetCollection((command[CommandKeyword.Collection] ?? string.Empty).ToString());
if (cc != null)
cc.Flush();
}
}
开发者ID:MohammadHabbab,项目名称:DensoDB,代码行数:9,代码来源:CollectionFlushHandler.cs
示例5: ChessGame
public ChessGame(Meta metainfo)
{
Info = metainfo;
Players.Add(new Player(1));
Players.Add(new Player(2));
State = new FENParser().Parse(
(Info["FEN"] == null) || (Info["FEN"].Equals("")) ? FENParser.DefaultFEN : Info["FEN"],
Players);
}
开发者ID:Maniulo,项目名称:GameWarden,代码行数:11,代码来源:ChessGame.cs
示例6: AccionGuardar
private bool AccionGuardar()
{
if (!this.Validar())
return false;
Cargando.Mostrar();
int iSucursalID = Util.Entero(this.cmbSucursal.SelectedValue);
// Se guardan las metas específicas
Meta oMeta;
foreach (DataGridViewRow oFila in this.dgvEspecificas.Rows)
{
if (oFila.IsNewRow) continue;
int iMetaID = Util.Entero(oFila.Cells["mesMetaID"].Value);
int iCambio = Util.Entero(oFila.Cells["mesCambio"].Value);
switch (iCambio)
{
case Cat.TiposDeAfectacion.Agregar:
case Cat.TiposDeAfectacion.Modificar:
if (iCambio == Cat.TiposDeAfectacion.Agregar)
oMeta = new Meta() { SucursalID = iSucursalID };
else
oMeta = Datos.GetEntity<Meta>(c => c.MetaID == iMetaID);
oMeta.VendedorID = (Util.Entero(oFila.Cells["mesUsuarioID"].Value) > 0 ?
(int?)Util.Entero(oFila.Cells["mesUsuarioID"].Value) : null);
oMeta.MarcaParteID = (Util.Entero(oFila.Cells["mesMarcaID"].Value) > 0 ?
(int?)Util.Entero(oFila.Cells["mesMarcaID"].Value): null);
oMeta.LineaID = (Util.Entero(oFila.Cells["mesLineaID"].Value) > 0 ?
(int?)Util.Entero(oFila.Cells["mesLineaID"].Value) : null);
oMeta.ParteID = (Util.Entero(oFila.Cells["mesParteID"].Value) > 0 ?
(int?)Util.Entero(oFila.Cells["mesParteID"].Value) : null);
oMeta.NombreMeta = Util.Cadena(oFila.Cells["mesNombre"].Value);
oMeta.Cantidad = Util.Decimal(oFila.Cells["mesCantidad"].Value);
oMeta.RutaImagen = Util.Cadena(oFila.Cells["mesRutaImagen"].Value);
Datos.Guardar<Meta>(oMeta);
break;
case Cat.TiposDeAfectacion.Borrar:
oMeta = Datos.GetEntity<Meta>(c => c.MetaID == iMetaID);
Datos.Eliminar<Meta>(oMeta);
break;
}
}
Cargando.Cerrar();
this.CargarDatos();
return true;
}
开发者ID:moisesiq,项目名称:aupaga,代码行数:48,代码来源:CatMetas.cs
示例7: SetPara
/// <summary>
/// Create parametter grid from meta.ParameterDefaultValues
/// </summary>
/// <param name="meta"></param>
protected void SetPara(Meta meta)
{
this.ShowMessage("");
this.myMeta = meta;
paramGrid.Rows.Clear();
string[] keys = meta.ParameterList.Keys;
object[] values = meta.ParameterList.Values;
for (int idx = 0; idx < keys.Length; idx++)
{
paramGrid.Rows.Add(keys[idx],values[idx]);
}
valueColumn.DefaultCellStyle.Format = "N" + meta.ParameterPrecision.ToString();
paraDescEd.Text = common.system.ToString(meta.ParameterDescriptions);
hintTextEd.Text = meta.Description + common.Consts.constCRLF + meta.URL;
}
开发者ID:oghenez,项目名称:trade-software,代码行数:20,代码来源:baseStrategyForm.cs
示例8: HandleCommand
public void HandleCommand(IStore store, Meta.BSon.BSonDoc command)
{
BSonDoc value = null;
var collection = string.Empty;
if (command.HasProperty(CommandKeyword.Value))
{
value = command[CommandKeyword.Value] as BSonDoc;
}
if (command.HasProperty(CommandKeyword.Collection))
{
collection = (command[CommandKeyword.Collection] ?? string.Empty).ToString();
}
OnHandle(store, collection, command, value);
}
开发者ID:MohammadHabbab,项目名称:DensoDB,代码行数:16,代码来源:BaseCommandHandler.cs
示例9: AlternateViewStartPath
public void AlternateViewStartPath()
{
// Given
Engine engine = new Engine();
engine.RootFolder = TestContext.CurrentContext.TestDirectory;
engine.InputFolder = @"TestFiles\Input\";
ReadFiles readFiles = new ReadFiles(@"AlternateViewStartPath\Test.cshtml");
Razor razor = new Razor().WithViewStart(@"AlternateViewStart\_ViewStart.cshtml");
Meta meta = new Meta("Content", (x, y) => x.Content);
engine.Pipelines.Add("Pipeline", readFiles, razor, meta);
// When
engine.Execute();
// Then
Assert.AreEqual(1, engine.Documents.FromPipeline("Pipeline").Count());
Assert.AreEqual("LAYOUT\r\n<p>This is a test</p>", engine.Documents.FromPipeline("Pipeline").First().String("Content"));
}
开发者ID:ryanrousseau,项目名称:Wyam,代码行数:18,代码来源:RazorTests.cs
示例10: RunWithSqlServer
public static void RunWithSqlServer(IEnumerable<RecordBlueprint> recordDescriptors, Action<ISessionFactory> action)
{
var temporaryPath = Path.GetTempFileName();
if (File.Exists(temporaryPath))
File.Delete(temporaryPath);
Directory.CreateDirectory(temporaryPath);
var databasePath = Path.Combine(temporaryPath, "Coevery.mdf");
var databaseName = Path.GetFileNameWithoutExtension(databasePath);
try {
// create database
if (!TryCreateSqlServerDatabase(databasePath, databaseName))
return;
var meta = new Meta<CreateDataServicesProvider>((dataFolder, connectionString) =>
new SqlServerDataServicesProvider(dataFolder, connectionString),
new Dictionary<string, object> { { "ProviderName", "SqlServer" } });
var manager = (IDataServicesProviderFactory)new DataServicesProviderFactory(new[] { meta });
var parameters = new SessionFactoryParameters {
Provider = "SqlServer",
DataFolder = temporaryPath,
ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFileName=" + databasePath + ";Integrated Security=True;User Instance=True;",
RecordDescriptors = recordDescriptors,
};
var configuration = manager
.CreateProvider(parameters)
.BuildConfiguration(parameters);
new SchemaExport(configuration).Execute(false, true, false);
using (var sessionFactory = configuration.BuildSessionFactory()) {
action(sessionFactory);
}
}
finally {
try {
Directory.Delete(temporaryPath, true);
}
catch (IOException) { }
}
}
开发者ID:gokhandisikara,项目名称:Coevery-Framework,代码行数:43,代码来源:ProviderUtilities.cs
示例11: MetaEmString
public string MetaEmString(Meta meta)
{
if (meta == Meta.GANHAR_2KG)
return "Ganhar 2kg/semana";
else if (meta == Meta.GANHAR_1_5KG)
return "Ganhar 1.5kg/semana";
else if (meta == Meta.GANHAR_1KG)
return "Ganhar 1kg/semana";
else if (meta == Meta.GANHAR_0_5KG)
return "Ganhar 0.5kg/semana";
else if (meta == Meta.MANTER)
return "Manter peso";
else if (meta == Meta.PERDER_0_5KG)
return "Perder 0.5kg/semana";
else if (meta == Meta.PERDER_1KG)
return "Perder 1kg/semana";
else if (meta == Meta.PERDER_1_5KG)
return "Perder 1.5kg/semana";
else if (meta == Meta.PERDER_2KG)
return "Perder 2.0kg/semana";
else
throw new NotImplementedException();
}
开发者ID:CarlosMota,项目名称:Dieta,代码行数:23,代码来源:ConversorMeta.cs
示例12: MetaEmDouble
public double MetaEmDouble(Meta meta)
{
if (meta == Meta.GANHAR_2KG)
return 2;
else if (meta == Meta.GANHAR_1_5KG)
return 1.5;
else if (meta == Meta.GANHAR_1KG)
return 1;
else if (meta == Meta.GANHAR_0_5KG)
return 0.5;
else if (meta == Meta.MANTER)
return 0;
else if (meta == Meta.PERDER_0_5KG)
return -0.5;
else if (meta == Meta.PERDER_1KG)
return 1;
else if (meta == Meta.PERDER_1_5KG)
return -1.5;
else if (meta == Meta.PERDER_2KG)
return -2;
else
throw new NotImplementedException();
}
开发者ID:CarlosMota,项目名称:Dieta,代码行数:23,代码来源:ConversorMeta.cs
示例13: Buffer
public Buffer(Meta.File _file, UndoStack _undo, UndoStack _redo)
: base(tags)
{
/**
* Prepare for undo/redo.
*/
UndoStack = _undo;
RedoStack = _redo;
UndoStack.Applied.Add(e => RedoStack.Push(e.Invert()));
RedoStack.Applied.Add(e => UndoStack.Push(e.Invert()));
/**
* Read the file.
*/
File = _file;
var input = File.Info.OpenText();
IgnoreChanges(() => InsertAtCursor(input.ReadToEnd()));
input.Close();
PlaceCursor(GetIterAtOffset(0));
Changed += (o, a) =>
{
HasUnsavedChanges.Value = true;
};
}
开发者ID:ktvoelker,项目名称:di,代码行数:24,代码来源:Buffer.cs
示例14: LoadSimpleTemplateFile
public void LoadSimpleTemplateFile()
{
// Given
Engine engine = new Engine();
engine.RootFolder = TestContext.CurrentContext.TestDirectory;
engine.InputFolder = @"TestFiles\Input\";
ReadFiles readFiles = new ReadFiles(@"SimpleTemplate\Test.cshtml");
Razor razor = new Razor();
Meta meta = new Meta("Content", (x, y) => x.Content);
engine.Pipelines.Add("Pipeline", readFiles, razor, meta);
// When
engine.Execute();
// Then
Assert.AreEqual(1, engine.Documents.FromPipeline("Pipeline").Count());
Assert.AreEqual(@"<p>This is a test</p>", engine.Documents.FromPipeline("Pipeline").First().String("Content"));
}
开发者ID:ryanrousseau,项目名称:Wyam,代码行数:18,代码来源:RazorTests.cs
示例15: SaveRawToFile
/// <summary>
/// The save raw to file.
/// </summary>
/// <param name="outputFilePath">The output file path.</param>
/// <param name="meta">The meta.</param>
/// <remarks></remarks>
public void SaveRawToFile(string outputFilePath, Meta.Meta meta)
{
int x = outputFilePath.LastIndexOf('.');
string temp = outputFilePath.Substring(0, x + 1) + meta.type + "raw";
if (meta.type == "snd!" &&
(meta.Map.HaloVersion == HaloVersionEnum.Halo2 ||
meta.Map.HaloVersion == HaloVersionEnum.Halo2Vista))
{
Stream s = File.Open(temp + "layout", FileMode.Create);
BinaryFormatter b = new BinaryFormatter();
Sound temps = (Sound)meta.raw;
b.Serialize(s, temps.Permutations);
s.Flush();
s.Close();
}
XmlTextWriter xtw = new XmlTextWriter(temp + ".xml", Encoding.Default);
xtw.Formatting = Formatting.Indented;
xtw.WriteStartElement("RawData");
xtw.WriteAttributeString("TagType", meta.type);
xtw.WriteAttributeString("TagName", meta.name);
xtw.WriteAttributeString("RawType", meta.raw.containerType.ToString());
xtw.WriteAttributeString("RawChunkCount", this.rawChunks.Count.ToString());
xtw.WriteAttributeString("Date", DateTime.Today.ToShortDateString());
xtw.WriteAttributeString("Time", DateTime.Now.ToShortTimeString());
xtw.WriteAttributeString("EntityVersion", "0.1");
BinaryWriter BW = new BinaryWriter(new FileStream(temp, FileMode.Create));
int loc = 0;
for (x = 0; x < this.rawChunks.Count; x++)
{
RawDataChunk r = this.rawChunks[x];
if (r.offset == -1)
{
continue;
}
xtw.WriteStartElement("RawChunk");
xtw.WriteAttributeString("RawDataType", r.rawDataType.ToString());
xtw.WriteAttributeString("PointerMetaOffset", r.pointerMetaOffset.ToString());
xtw.WriteAttributeString("ChunkSize", r.size.ToString());
xtw.WriteAttributeString("RawDataOffset", loc.ToString());
xtw.WriteAttributeString("PointsToOffset", r.offset.ToString());
xtw.WriteAttributeString("RawLocation", r.rawLocation.ToString());
xtw.WriteEndElement();
BW.BaseStream.Write(r.MS.ToArray(), 0, r.size);
loc += r.size;
}
BW.Flush();
BW.Close();
xtw.WriteEndElement();
xtw.Flush();
xtw.Close();
}
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:62,代码来源:RawData.cs
示例16: LoadRawFromFile
/// <summary>
/// The load raw from file.
/// </summary>
/// <param name="inputFilePath">The input file path.</param>
/// <param name="meta">The meta.</param>
/// <returns></returns>
/// <remarks></remarks>
public RawDataContainer LoadRawFromFile(string inputFilePath, Meta.Meta meta)
{
RawDataContainer raw = new RawDataContainer();
int x = inputFilePath.LastIndexOf('.');
string temp = inputFilePath.Substring(0, x + 1) + meta.type + "raw";
XmlTextReader xtr = new XmlTextReader(temp + ".xml");
xtr.WhitespaceHandling = WhitespaceHandling.None;
FileStream FS = new FileStream(temp, FileMode.Open);
BinaryReader BR = new BinaryReader(FS);
while (xtr.Read())
{
switch (xtr.NodeType)
{
case XmlNodeType.Element:
if (xtr.Name == "RawData")
{
string oi = xtr.GetAttribute("RawType");
switch (oi)
{
case "Model":
raw = new Model();
break;
case "Bitmap":
raw = new BitmapRaw();
break;
case "Animation":
raw = new Animation();
break;
case "DECR":
raw = new DECR();
break;
case "PRTM":
raw = new PRTM();
break;
case "Weather":
raw = new Weather();
break;
case "Sound":
raw = new Sound();
break;
case "BSP":
raw = new BSPRaw();
break;
}
}
else if (xtr.Name == "RawChunk")
{
RawDataChunk r = new RawDataChunk();
string temps = xtr.GetAttribute("RawDataType");
switch (temps)
{
case "bitm":
r.rawDataType = RawDataType.bitm;
break;
case "bsp1":
r.rawDataType = RawDataType.bsp1;
break;
case "bsp2":
r.rawDataType = RawDataType.bsp2;
break;
case "bsp3":
r.rawDataType = RawDataType.bsp3;
break;
case "bsp4":
r.rawDataType = RawDataType.bsp4;
break;
case "DECR":
r.rawDataType = RawDataType.DECR;
break;
case "jmad":
r.rawDataType = RawDataType.jmad;
break;
case "ltmp":
r.rawDataType = RawDataType.ltmp;
break;
case "mode1":
r.rawDataType = RawDataType.mode1;
break;
case "mode2":
r.rawDataType = RawDataType.mode2;
break;
case "PRTM":
r.rawDataType = RawDataType.PRTM;
break;
case "snd1":
r.rawDataType = RawDataType.snd1;
break;
case "snd2":
r.rawDataType = RawDataType.snd2;
//.........这里部分代码省略.........
开发者ID:nolenfelten,项目名称:Blam_BSP,代码行数:101,代码来源:RawData.cs
示例17: EncodingEx
//--- Class Contstructor ---
static EncodingEx()
{
byte[] testBuf = new byte[0x7F];
for(int i = 0; i < 0x7F; i++) {
if(IsAsciiSupersetnessSensitive(i)) {
testBuf[i] = (byte)i;
} else {
testBuf[i] = 0x20;
}
}
foreach(var info in Encoding.GetEncodings()) {
var encoding = info.GetEncoding();
String name = NormalizeName(encoding.WebName);
String canonicalName = encoding.WebName.ToLowerInvariant();
if(!IsBanned(name)) {
var asciiSuperset = AsciiMapsToBasicLatin(testBuf, encoding);
var meta = new Meta {
CanonicalName = canonicalName,
Encoding = encoding,
AsciiSuperset = asciiSuperset,
IsObscure = IsObscure(name),
IsShouldNot = IsShouldNot(name),
IsLikelyEbcdic = IsLikelyEbcdic(name, asciiSuperset)
};
_encodingMeta.Add(info.CodePage, meta);
}
}
// Overwrite possible overlapping aliases with the real things--just in case
foreach(var meta in _encodingMeta.Values) {
_encodingByCanonicalName[NormalizeName(meta.CanonicalName)] = meta;
}
try {
Find("iso-8859-1").ActualHtmlEncoding = Find("windows-1252");
} catch { }
try {
Find("iso-8859-9").ActualHtmlEncoding = Find("windows-1254");
} catch { }
try {
Find("iso-8859-11").ActualHtmlEncoding = Find("windows-874");
} catch { }
try {
Find("x-iso-8859-11").ActualHtmlEncoding = Find("windows-874");
} catch { }
try {
Find("tis-620").ActualHtmlEncoding = Find("windows-874");
} catch { }
try {
Find("gb_2312-80").ActualHtmlEncoding = Find("gbk");
} catch { }
try {
Find("gb2312").ActualHtmlEncoding = Find("gbk");
} catch { }
try {
_encodingByCanonicalName[NormalizeName("x-x-big5")] = Find("big5");
} catch { }
try {
_encodingByCanonicalName[NormalizeName("euc-kr")] = Find("windows-949");
} catch { }
try {
_encodingByCanonicalName[NormalizeName("ks_c_5601-1987")] = Find("windows-949");
} catch { }
}
开发者ID:aaronmars,项目名称:DReAM,代码行数:65,代码来源:EncodingEx.cs
示例18: Open
public override void Open()
{
if (IsOpened)
return;
// make table
if (Table == null)
{
if (Adapter == null)
{
if (string.IsNullOrEmpty(_XmlFile)) throw new RuntimeException("Table, adapter, or file is not defined.");
// dataset
var ds = new DataSet();
ds.Locale = CultureInfo.CurrentCulture; // CA
// read schema
if (!string.IsNullOrEmpty(XmlSchema))
ds.ReadXmlSchema(XmlSchema);
// read data
ds.ReadXml(_XmlFile, XmlReadMode);
_XmlFileTime = _XmlFileTime = File.GetLastWriteTime(_XmlFile);
// accept data
ds.AcceptChanges();
// table
Table = GetTable(ds, TableName);
}
else
{
if (Adapter.SelectCommand == null) throw new RuntimeException("Adapter select command is null.");
Table = new DataTable();
Table.Locale = CultureInfo.CurrentCulture; // CA
}
}
// fill and drop the flag avoiding 2nd call on opening
Fill();
NeedsNewFiles = false;
// pass 1: collect the columns
IList<Meta> metas;
if (Columns == null)
{
// collect/filter table columns to be shown
int Count = Math.Min(Table.Columns.Count, Settings.Default.MaximumPanelColumnCount);
metas = new List<Meta>(Count);
int nCollected = 0;
foreach (DataColumn column in Table.Columns)
{
// skip hidden not calculated columns
if (column.ColumnMapping == MappingType.Hidden && column.Expression.Length == 0)
continue;
// skip not linear data
if (!Converter.IsLinearType(column.DataType))
continue;
// infer column meta data
Meta meta = new Meta(column.ColumnName);
meta.Kind = FarColumn.DefaultColumnKinds[nCollected];
metas.Add(meta);
++nCollected;
if (nCollected >= Count)
break;
}
}
else
{
// setup user defined columns
metas = Format.SetupColumns(Columns);
}
// at least one column
if (metas.Count == 0)
throw new InvalidOperationException("There is no column to display.");
// pass 2: mapping
foreach (Meta meta in metas)
{
DataColumn column = Table.Columns[meta.Property];
switch (meta.Kind[0])
{
case 'N':
Map.Name = column.Ordinal;
break;
case 'O':
Map.Owner = column.Ordinal;
break;
case 'Z':
Map.Description = column.Ordinal;
break;
case 'C':
Map.Columns.Add(column.Ordinal);
break;
case 'S':
//.........这里部分代码省略.........
开发者ID:pezipink,项目名称:FarNet,代码行数:101,代码来源:DataPanel.cs
示例19: Callback
public void Callback(object value, Meta.TypeModel.CallbackType callbackType, SerializationContext context){}
开发者ID:Ribosome2,项目名称:protobuf-net-1,代码行数:1,代码来源:TupleSerializer.cs
示例20: OnLoad
protected override void OnLoad(EventArgs onloadEvent)
{
base.OnLoad(onloadEvent);
ModuleInfo moduleInfo = ModuleControl.ModuleContext.Configuration;
if (moduleInfo.IsDeleted)
return;
string metaPath = Server.MapPath(moduleInfo.ContainerPath) + "StyleWizard\\meta.json",
metaJson;
try
{
metaJson = File.ReadAllText(metaPath, Encoding.UTF8);
}
catch (Exception e)
{
if (e is DirectoryNotFoundException || e is FileNotFoundException)
return;
throw new Exception("The container meta file can't be read.", e);
}
Meta meta = new Meta();
try
{
meta = JsonConvert.DeserializeObject<Meta>(metaJson);
}
catch (Exception e)
{
throw new Exception("The container meta file contains invalid JSON.", e);
}
string containerFilename = moduleInfo.ContainerSrc.Substring(moduleInfo.ContainerSrc.LastIndexOf('/') + 1),
containerTheme = moduleInfo.ContainerPath.Remove(moduleInfo.ContainerPath.Length - 1),
containerPortalId = containerTheme.Remove(containerTheme.LastIndexOf('/'));
containerPortalId = containerPortalId.Remove(containerPortalId.LastIndexOf('/'));
containerPortalId = containerPortalId.Substring(containerPortalId.LastIndexOf('/') + 1);
containerTheme = containerTheme.Substring(containerTheme.LastIndexOf('/') + 1);
containerFilename = containerFilename.Remove(containerFilename.IndexOf('.'));
ActiveStyle activeStyle = new ActiveStyle();
try
{
activeStyle = meta.activeStyles[containerFilename];
}
catch
{
activeStyle.id = "default";
activeStyle.type = "predefined";
}
if (String.IsNullOrEmpty(templateGroup))
templateGroup = "default";
containerClass.Text = String.Concat(
"eds_containers_", containerTheme,
" eds_templateGroup_", templateGroup,
" eds_template_", containerFilename,
(activeStyle.type != "predefined" || activeStyle.id != "default" ? " eds_style_" + activeStyle.type + "_" + activeStyle.id : "")
);
string containersCssPath = Server.MapPath(moduleInfo.ContainerPath) + "container.css";
if (File.Exists(containersCssPath))
return;
new ContainerController(containerTheme, containerPortalId, PortalSettings.HomeDirectoryMapPath, PortalSettings.HomeDirectory).rebuildCss();
Control cssPageControl = Page.FindControl("CSS");
if (cssPageControl == null)
return;
if (Page.Header.FindControl(ID) != null)
return;
var linkTag = new HtmlLink();
linkTag.ID = Globals.CreateValidID(containerPortalId + "_" + containerTheme + "_containers");
linkTag.Attributes["rel"] = "stylesheet";
linkTag.Attributes["type"] = "text/css";
linkTag.Href = moduleInfo.ContainerPath + "container.css";
cssPageControl.Controls.Add(linkTag);
}
开发者ID:Kanstantsin-Ausiannikau,项目名称:budnyby,代码行数:91,代码来源:Container.ascx.cs
注:本文中的Meta类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论