本文整理汇总了C#中Library类的典型用法代码示例。如果您正苦于以下问题:C# Library类的具体用法?C# Library怎么用?C# Library使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Library类属于命名空间,在下文中一共展示了Library类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RemoteVolume
public RemoteVolume(Library.Interface.IFileEntry file, string hash = null)
{
this.Name = file.Name;
this.Size = file.Size;
this.Hash = hash;
this.File = file;
}
开发者ID:HITSUN2015,项目名称:duplicati,代码行数:7,代码来源:RemoteVolume.cs
示例2: OnAfter_AddClassProperties
/// <summary>
/// Called when [after_ add class properties].
/// </summary>
/// <param name="assemblyCode">The assembly code.</param>
/// <param name="process">The process.</param>
/// <param name="isInfoProperty">if set to <c>true</c> [is information property].</param>
/// <param name="resolveRefTypes">if set to <c>true</c> [resolve reference types].</param>
/// <param name="skipId">if set to <c>true</c> [skip identifier].</param>
public override void OnAfter_AddClassProperties(StringBuilder assemblyCode, Library.Process.Publisher.Definitions.IProcessDefinition process, bool isInfoProperty, bool resolveRefTypes, bool skipId = false)
{
base.OnAfter_AddClassProperties(assemblyCode, process, isInfoProperty, resolveRefTypes, skipId);
if (!isInfoProperty) return;
foreach (var crf in process.RootTable.FieldList.Where(f => f.ColumnType == ColumnTypes.Reference && !f.IsHidden && f.IncludeInList))
{
assemblyCode.AppendFormat(@"
private {1}Info _{0}Member;
public {1}Info {0}Member
{{
get
{{
if (_{0}Member == null && {0}Id > 0)
{{
var items = {1}List.Get{1}PageList(string.Empty, {0}Id, 1, null, null);
if (items.Count > 0)
{{
_{0}Member = items[0];
}}
}}
return _{0}Member;
}}
}}
"
, crf.ColumnName, crf.ReferencedProcessName);
}
}
开发者ID:mparsin,项目名称:Elements,代码行数:37,代码来源:BaseBusinessUnitExtension.cs
示例3: LoadPlaylists
/// <summary>
/// Loads all the play-lists in the play-list folder
/// </summary>
public static void LoadPlaylists(Library libary)
{
//var playlistFiles = FileSystemHelper.SearchFiles(PlaylistFolder, "*.m3u", false);
//Playlists = playlistFiles.Select(playlistFile => LoadPlaylist(playlistFile, libary)).ToList();
Playlists = new List<Playlist>();
}
开发者ID:jasonhighet,项目名称:Halloumi.Shuffler,代码行数:10,代码来源:PlaylistHelper.cs
示例4: BulkThumbnailGenerator
public BulkThumbnailGenerator(Library library, SizedThumbnailGenerator thumbnailGenerator)
{
_library = library;
_thumbnailGenerator = thumbnailGenerator;
ThumbnailGenerated += (_, __) => { };
}
开发者ID:stusherwin,项目名称:MediaTagger,代码行数:7,代码来源:BulkThumbnailGenerator.cs
示例5: Charts
public Charts()
{
this.InitializeComponent();
library = new Library();
this.Loaded += MainPage_Loaded;
rtrackact = new RootObjectTrackAct();
}
开发者ID:agangal,项目名称:TrackMyAct,代码行数:7,代码来源:Charts.xaml.cs
示例6: Start
new void Start()
{
base.Start();
library = GameObject.FindObjectOfType<Library>();
button = GetComponent<Button>();
button.onClick.AddListener(delegate { UseButton(); });
}
开发者ID:taboo1,项目名称:arena,代码行数:7,代码来源:BoosterButton.cs
示例7: Parse
public IList<String> Parse(string input, bool showOutput)
{
Context.Parser = this;
Context.Object = null;
Context.IndirectObject = null;
parserResults = new List<string>();
Library L = new Library();
bool wasLit = L.IsLit();
var userInput = new UserInput();
var inputResult = userInput.Parse(input);
isAll = inputResult.IsAll;
if (inputResult.HasError)
{
parserResults.Add(inputResult.Error);
}
else
{
HandleInputResult(inputResult);
}
if (!wasLit && L.IsLit())
L.Look(true);
return GetResults(showOutput);
}
开发者ID:jphamilton,项目名称:Adventure.Net,代码行数:29,代码来源:Parser3.cs
示例8: ToInfoMessage
public static string ToInfoMessage(Library.Net.Amoeba.Seed seed)
{
if (seed == null) throw new ArgumentNullException("seed");
try
{
var keywords = seed.Keywords.Where(n => !string.IsNullOrWhiteSpace(n)).ToList();
StringBuilder builder = new StringBuilder();
if (!string.IsNullOrWhiteSpace(seed.Name)) builder.AppendLine(string.Format("{0}: {1}", LanguagesManager.Instance.Seed_Name, seed.Name));
if (seed.Certificate != null) builder.AppendLine(string.Format("{0}: {1}", LanguagesManager.Instance.Seed_Signature, seed.Certificate.ToString()));
builder.AppendLine(string.Format("{0}: {1:#,0}", LanguagesManager.Instance.Seed_Length, seed.Length));
if (keywords.Count != 0) builder.AppendLine(string.Format("{0}: {1}", LanguagesManager.Instance.Seed_Keywords, String.Join(", ", keywords)));
builder.AppendLine(string.Format("{0}: {1} UTC", LanguagesManager.Instance.Seed_CreationTime, seed.CreationTime.ToUniversalTime().ToString(LanguagesManager.Instance.DateTime_StringFormat, System.Globalization.DateTimeFormatInfo.InvariantInfo)));
if (!string.IsNullOrWhiteSpace(seed.Comment)) builder.AppendLine(string.Format("{0}: {1}", LanguagesManager.Instance.Seed_Comment, seed.Comment));
if (builder.Length != 0) return builder.ToString().Remove(builder.Length - 2);
else return null;
}
catch (Exception e)
{
throw new ArgumentException("ArgumentException", e);
}
}
开发者ID:networkelements,项目名称:Amoeba,代码行数:25,代码来源:MessageConverter.cs
示例9: Project
public Project()
{
Uid = Guid.NewGuid();
_services = new ServiceContainer();
Name = "Project";
_levels = new NamedResourceCollection<Level>();
_levels.Modified += (s, e) => OnModified(EventArgs.Empty);
_libraryManager = new LibraryManager();
_libraryManager.Libraries.Modified += (s, e) => OnModified(EventArgs.Empty);
Library defaultLibrary = new Library();
_libraryManager.Libraries.Add(defaultLibrary);
Extra = new List<XmlElement>();
_texturePool = new MetaTexturePool();
_texturePool.AddPool(defaultLibrary.Uid, defaultLibrary.TexturePool);
_tilePools = new MetaTilePoolManager(_texturePool);
_tilePools.AddManager(defaultLibrary.Uid, defaultLibrary.TilePoolManager);
_objectPools = new MetaObjectPoolManager(_texturePool);
_objectPools.AddManager(defaultLibrary.Uid, defaultLibrary.ObjectPoolManager);
_tileBrushes = new MetaTileBrushManager();
_tileBrushes.AddManager(defaultLibrary.Uid, defaultLibrary.TileBrushManager);
SetDefaultLibrary(defaultLibrary);
_services.AddService(typeof(TilePoolManager), _tilePools);
ResetModified();
}
开发者ID:jaquadro,项目名称:Treefrog,代码行数:35,代码来源:Project.cs
示例10: Start
/// <summary>
/// Starts the applications logic. Loads libraries, ect.
/// </summary>
public void Start()
{
//Load the app settings
_settings = new Settings();
_settings.Load();
try
{
FileInfo dataFile = new FileInfo(_settings.LibraryDatabaseFilePath);
if(!dataFile.Directory.Exists )
{
dataFile.Directory.Create();
}
}
catch(Exception e)
{
//Well this puts us in a pickle
// System.Windows.Forms.MessageBox.Show("Unable to start αPlay! Could not find nor create αPlay directory.\r\nError: " + e.Message, "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
//Load main library
Library mainLib = new Library(_settings.LibraryDatabaseFilePath);
_libraries.Add(mainLib);
//Start UI thread
// _uiThread = new Thread(new ThreadStart(delegate {Application.Run(new MainWindow(this));}));
//_uiThread.SetApartmentState(ApartmentState.STA);
//_uiThread.IsBackground = false;
//_uiThread.Start();
}
开发者ID:PacificACM,项目名称:aPlay,代码行数:35,代码来源:aPlayApp.cs
示例11: Main
static void Main(string[] args)
{
Database.SetInitializer(new LibraryInitializer());
//var person = new Author
//{
// AuthorId = 2,
// Email = "[email protected]",
// Name = "Helen",
// BirthDate = DateTime.Now,
//};
//var collection = new BooksCollection
//{
// Name = "New collection",
// BooksCollectionId = 1,
// CollectorId = 2
//};
//var book = new Book
//{
// BookId = 1,
// Name = "First book",
// AuthorId = 2,
// BookCollectionId = 1,
//};
using (var db = new Library())
{
// db.Collections.Add(collection);
// db.Authors.Add(person);
// db.Books.Add(book);
db.SaveChanges();
// //var author = db.Books.First().Author; author is NULL!!!!
// //Console.Write(string.Format("Firat book author name is {0}, email is {1}", author.Name, author.Email));
}
Console.Write("Author saved !");
Console.ReadLine();
}
开发者ID:Helen1987,项目名称:edu,代码行数:35,代码来源:Program.cs
示例12: Save
public static void Save(Library sourceLib, string Path)
{
try
{
string[] chn = new string[Library.CurrentLength()];
string[] eng = new string[Library.CurrentLength()];
string[] frequencyString = new string[Library.CurrentLength()];
for (int i = 0; i < Library.CurrentLength(); i++)
{
//if (sourceLib.GetEntry(i) == null)
//{
//chn[i] = "";
//eng[i] = "";
//frequencyString[i] = "0";
//}//prevent empty entry : string ""
//else
//{
chn[i] = sourceLib.GetEntry(i).GetChinese();
eng[i] = sourceLib.GetEntry(i).GetEnglish();
frequencyString[i] = sourceLib.GetEntry(i).GetFrequency().ToString();
//}
}
System.IO.File.WriteAllLines(frequencyPath, frequencyString);
System.IO.File.WriteAllLines(engPath, eng);
System.IO.File.WriteAllLines(chnPath, chn);
}
catch { DeleteLibrary(); }
}
开发者ID:moodspace,项目名称:autodefinition,代码行数:31,代码来源:LibraryUtility.cs
示例13: testConstructedGenericClass
public void testConstructedGenericClass() {
var typeSystem = new Library(new String[] { bin });
var typeInfo = typeSystem.getType("stab/bytecode/test/classes/GenericClass");
var args = new ArrayList<TypeInfo>();
args.add(typeSystem.getType("java/lang/String"));
doTest("ConstructedGenericClass", typeSystem.getGenericType(typeInfo, args));
}
开发者ID:nagyistoce,项目名称:cnatural-language,代码行数:7,代码来源:TypeSystemTest.stab.cs
示例14: testObjectMethods
public void testObjectMethods() {
var typeSystem = new Library(new String[] {});
var typeInfo = typeSystem.getType("java/lang/Object");
var names = Query.asIterable(new String[] {
"<init>", "equals", "getClass", "hashCode", "notify", "notifyAll", "toString", "wait", "wait", "wait" });
Assert.assertTrue(typeInfo.Methods.where(p => p.IsPublic).select(p => p.Name).orderBy(p => p).sequenceEqual(names));
}
开发者ID:nagyistoce,项目名称:cnatural-language,代码行数:7,代码来源:TypeSystemTest.stab.cs
示例15: Main
static void Main(string[] args)
{
Book firstBook = new Book("C#", "Svetlin Nakov");
Book secondBook = new Book("Java", "Svetlin Nakov");
Book thirdBook = new Book(".NET", "Svetlin Nakov");
Book fourthBook = new Book("Ice and fire", "George Martin");
Library telerikLib = new Library("Telerik Library");
telerikLib.Add(firstBook);
telerikLib.Add(secondBook);
telerikLib.Add(thirdBook);
telerikLib.Add(fourthBook);
Console.WriteLine("Display library :");
telerikLib.DisplayAll();
int startIndx = 0;
int indxFound;
while (telerikLib.IndexOf("Svetlin Nakov", startIndx, SearchOption.Author) != -1)
{
indxFound = telerikLib.IndexOf("Svetlin Nakov", startIndx, SearchOption.Author);
telerikLib.DeleteAt(indxFound);
}
Console.WriteLine("\nAfter deleting :");
telerikLib.DisplayAll();
}
开发者ID:VaniaStoicheva,项目名称:Library,代码行数:28,代码来源:TestLibrary.cs
示例16: Initialize
public async Task Initialize()
{
// Quickly create a new domain named 'test' with its schema MyModelDefinition
var domain = await StoreBuilder.CreateDomain<LibraryDefinition>("lib");
// Allow to omit the domain argument when you create a domain element.
domain.Store.DefaultSessionConfiguration.DefaultDomainModel = domain;
// Instanciate a new Library within the domain (always in a session)
var rnd = new Random();
using (var session = domain.Store.BeginSession())
{
Library = new Library();
Library.Name = "My library";
for (int i = 1; i < 20; i++)
{
var b = new Book();
b.Title = "Book " + i.ToString();
b.Copies = 1 + rnd.Next(10);
Library.Books.Add(b);
var m = new Member();
m.Name = "Member " + i.ToString();
Library.Members.Add(m);
}
session.AcceptChanges();
}
}
开发者ID:Hyperstore,项目名称:Hyperstore.Samples,代码行数:30,代码来源:Model.cs
示例17: Create
public ActionResult Create(Library library, HttpPostedFileBase file, Guid id)
{
string fileName = Path.GetFileName(file.FileName);
if (fileName != null)
{
var path = Path.Combine(Server.MapPath("~/Image"), library.Name+".jpg");
file.SaveAs(path);
}
library.Address = new Address()
{
City = library.Address.City,
Contry = library.Address.Contry,
PostCode = library.Address.PostCode,
Street = library.Address.Street,
Number = library.Address.Number
};
library.Photo = library.Name + ".jpg";
try
{
if (_libraryRepository.AddLibrary(library,_libraryRepository.GetUserByGuid(id) ))
{
return RedirectToActionPermanent("Index", "Home");
}
}
catch (Exception)
{
return View(library);
}
return View(library);
}
开发者ID:krypton9208,项目名称:OnlineLib,代码行数:31,代码来源:LibraryController.cs
示例18: PropertyStatus
public PropertyStatus(Library.ProjectEdit project, string propertyName)
{
_propertyName = propertyName;
_project = project;
_project.PropertyChanged += _project_PropertyChanged;
}
开发者ID:RodrigoGT,项目名称:csla,代码行数:7,代码来源:ProjectEdit.cs
示例19: GroupElement
public GroupElement(Group group, ConfigLocation location, Library representing)
: base(@group.Name, null)
{
Group = group;
Location = location;
Representing = representing;
}
开发者ID:pescuma,项目名称:dependency-checker,代码行数:7,代码来源:GroupElement.cs
示例20: userMapOverlay
public userMapOverlay(IMapDrawable drawable, Geocode geocode, Library.User user)
{
_drawable = (userMapDrawable)drawable;
_geocode = geocode;
_user = user;
_offset = new Point((ClientSettings.SmallArtSize + (ClientSettings.Margin * 2) / 2), (ClientSettings.SmallArtSize + (ClientSettings.Margin * 2)));
}
开发者ID:enersia,项目名称:pocketwit,代码行数:7,代码来源:userMapOverlay.cs
注:本文中的Library类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论