本文整理汇总了C#中Mediachase类的典型用法代码示例。如果您正苦于以下问题:C# Mediachase类的具体用法?C# Mediachase怎么用?C# Mediachase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Mediachase类属于命名空间,在下文中一共展示了Mediachase类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetProperties
public override Mediachase.Net.Wdom.PropertyInfoCollection GetProperties(Mediachase.Net.Wdom.WebDavElementInfo element)
{
PropertyInfoCollection retVal = new PropertyInfoCollection();
PropertyInfo prop = null;
#region CreateDefaultProperties
foreach (PropertyInfo defaultProp in PropertyInfo.CreateDefaultProperties(element))
{
SetProperty(retVal, defaultProp, false);
}
#endregion
//Add <supportedlock> property
if (((int)(WebDavApplication.Class & WebDavServerClass.Class2)) != 0)
{
prop = PropertyInfo.CreateSupportedLockProperty();
prop.Calculated = false;
SetProperty(retVal, prop, false);
}
//Add <resourcetype> property
prop = PropertyInfo.CreateResourceTypeProperty(element);
SetProperty(retVal, prop, false);
retVal.ElementInfo = element;
return retVal;
}
开发者ID:0anion0,项目名称:IBN,代码行数:25,代码来源:RootFolderStorageProvider.cs
示例2: CopyEntityObjectToMetaObject
protected override void CopyEntityObjectToMetaObject(EntityObject target, Mediachase.Ibn.Data.Meta.MetaObject metaObject)
{
base.CopyEntityObjectToMetaObject(target, metaObject);
if (metaObject.GetMetaType().Name == AddressEntity.GetAssignedMetaClassName())
AddressRequestHandler.UpdateAddressName(metaObject);
}
开发者ID:0anion0,项目名称:IBN,代码行数:7,代码来源:OrganizationRequestHandler.cs
示例3: GetFileStorageWebDavUrl
/// <summary>
/// Gets the web dav URL by FileInfo.
/// </summary>
/// <param name="fileInfo">The file info.</param>
/// <param name="withAuthToken">if set to <c>true</c> [with auth token].</param>
/// <returns></returns>
public static string GetFileStorageWebDavUrl(Mediachase.IBN.Business.ControlSystem.FileInfo fileInfo, bool withAuthToken)
{
if (fileInfo == null)
throw new ArgumentNullException("fielInfo");
return GetFileStorageWebDavUrl(fileInfo.Id, fileInfo.Name, withAuthToken);
}
开发者ID:0anion0,项目名称:IBN,代码行数:13,代码来源:WebDavUrlBuilder.cs
示例4: BindData
public void BindData(Mediachase.Ibn.Data.Meta.Management.MetaClass mc, string FieldType)
{
Decimal defaultValue = 0.0000M;
int maxPointDigits = 4;
txtDefaultValue.Text = defaultValue.ToString();
txtMaxPointDigits.Text = maxPointDigits.ToString();
}
开发者ID:0anion0,项目名称:IBN,代码行数:8,代码来源:DecimalPercent.Manage.ascx.cs
示例5: OpenRead
/// <summary>
/// Opens the read.
/// </summary>
/// <param name="element">The element.</param>
/// <returns></returns>
public override System.IO.Stream OpenRead(Mediachase.Net.Wdom.WebDavElementInfo element)
{
if (element == null || element is CollectionInfo)
return null;
Mediachase.Ibn.Data.Meta.FileInfo fileInfo = (Mediachase.Ibn.Data.Meta.FileInfo)element.Tag;
return fileInfo.OpenRead();
}
开发者ID:0anion0,项目名称:IBN,代码行数:13,代码来源:MetaDataProvider.cs
示例6: ValidateArgs
public ValidateArgs(Mediachase.Forum.Node Node, string CommandUid, bool IsVisible, bool IsEnabled, bool IsBreak)
{
this.Node = Node;
this.CommandUid = CommandUid;
this.IsVisible = IsVisible;
this.IsEnabled = IsEnabled;
this.IsBreak = IsBreak;
}
开发者ID:0anion0,项目名称:IBN,代码行数:8,代码来源:ValidateHandler.cs
示例7: CopyEntityObjectToMetaObject
protected override void CopyEntityObjectToMetaObject(EntityObject target, Mediachase.Ibn.Data.Meta.MetaObject metaObject)
{
base.CopyEntityObjectToMetaObject(target, metaObject);
// OZ 2009-06-04 Duration Fix
TimeType timeType = (TimeType)(int)metaObject[WorkflowInstanceEntity.FieldPlanFinishTimeType];
if (timeType == TimeType.Duration &&
metaObject[WorkflowInstanceEntity.FieldPlanDuration] == null)
{
metaObject[WorkflowInstanceEntity.FieldPlanFinishTimeType] = (int)TimeType.NotSet;
timeType = TimeType.NotSet;
}
else if (timeType == TimeType.DateTime &&
metaObject[WorkflowInstanceEntity.FieldPlanFinishDate] == null)
{
metaObject[WorkflowInstanceEntity.FieldPlanFinishTimeType] = (int)TimeType.NotSet;
timeType = TimeType.NotSet;
}
// Recalculate Plan Date
if (timeType == TimeType.NotSet)
{
metaObject[WorkflowInstanceEntity.FieldPlanDuration] = null;
metaObject[WorkflowInstanceEntity.FieldPlanFinishDate] = null;
}
else if (timeType == TimeType.Duration)
{
DateTime? actualStartDate = (DateTime?)metaObject[WorkflowInstanceEntity.FieldActualStartDate];
int duration = (int)metaObject[WorkflowInstanceEntity.FieldPlanDuration];
if (actualStartDate.HasValue)
{
metaObject[WorkflowInstanceEntity.FieldPlanFinishDate] = actualStartDate.Value.AddMinutes(duration);
}
else
{
metaObject[WorkflowInstanceEntity.FieldPlanFinishDate] = null;
}
}
else if (timeType == TimeType.DateTime)
{
DateTime? actualStartDate = (DateTime?)metaObject[WorkflowInstanceEntity.FieldActualStartDate];
DateTime planFinishDate = (DateTime)metaObject[WorkflowInstanceEntity.FieldPlanFinishDate];
if (actualStartDate.HasValue)
{
metaObject[WorkflowInstanceEntity.FieldPlanDuration] = (int)(planFinishDate - actualStartDate.Value).TotalMinutes;
}
else
{
metaObject[WorkflowInstanceEntity.FieldPlanDuration] = null;
}
}
//
}
开发者ID:0anion0,项目名称:IBN,代码行数:56,代码来源:WorkflowInstanceRequestHandler.cs
示例8: OpenRead
public override System.IO.Stream OpenRead(Mediachase.Net.Wdom.WebDavElementInfo element)
{
if (element == null || element is CollectionInfo)
return null;
Mediachase.IBN.Business.EMail.EMailMessageInfo.AttachmentData entry =
element.Tag as Mediachase.IBN.Business.EMail.EMailMessageInfo.AttachmentData;
return new MemoryStream(entry.Data);
}
开发者ID:0anion0,项目名称:IBN,代码行数:10,代码来源:EmailStorageProvider.cs
示例9: ctrlGrid_ChangingMCGridColumnHeader
void ctrlGrid_ChangingMCGridColumnHeader(object sender, Mediachase.Ibn.Web.UI.ChangingMCGridColumnHeaderEventArgs e)
{
if (e.FieldName == "PriorityId")
{
e.ControlField.HeaderText = string.Format(CultureInfo.InvariantCulture, "<span title='{0}'>!!!</span>", GetGlobalResourceObject("IbnFramework.Project", "Priority").ToString());
//e.ControlField.HeaderText = String.Format("<img width='16' height='16' src='{0}' title='{1}'>",
// this.Page.ResolveClientUrl("~/layouts/images/PriorityHeader.gif"),
// GetGlobalResourceObject("IbnFramework.Project", "Priority").ToString());
}
}
开发者ID:0anion0,项目名称:IBN,代码行数:10,代码来源:ActiveProjects.ascx.cs
示例10: GetByteArray
protected byte[] GetByteArray(Mediachase.FileUploader.Web.UI.McHtmlInputFile fControl)
{
byte[] MyFile = null;
if (fControl.PostedFile != null && fControl.PostedFile.ContentLength > 0)
{
MyFile = new byte[fControl.PostedFile.ContentLength];
fControl.PostedFile.InputStream.Read(MyFile, 0, fControl.PostedFile.ContentLength);
}
return MyFile;
}
开发者ID:0anion0,项目名称:IBN,代码行数:10,代码来源:SettingsEdit.ascx.cs
示例11: Invoice
public Invoice(Mediachase.Commerce.Orders.Payment payment, IVerificationManager verificationManager, IPaymentManager paymentManager, IParameterReader parameterReader,
ICartActions cartActions, IOrderNumberGenerator orderNumberGenerator, IAdditionalValuesFormatter additionalValuesFormatter, IPaymentActions paymentActions)
: base(payment)
{
_verificationManager = verificationManager;
_paymentManager = paymentManager;
_parameterReader = parameterReader;
_cartActions = cartActions;
_orderNumberGenerator = orderNumberGenerator;
_additionalValuesFormatter = additionalValuesFormatter;
_paymentActions = paymentActions;
}
开发者ID:Amulius112,项目名称:PayEx.EPi.Commerce.Payment,代码行数:12,代码来源:Invoice.cs
示例12: DirectBankDebit
public DirectBankDebit(Mediachase.Commerce.Orders.Payment payment, IPaymentManager paymentManager,
IParameterReader parameterReader, ICartActions cartActions, IOrderNumberGenerator orderNumberGenerator,
IAdditionalValuesFormatter additionalValuesFormatter, IPaymentActions paymentActions)
: base(payment)
{
_paymentManager = paymentManager;
_parameterReader = parameterReader;
_cartActions = cartActions;
_orderNumberGenerator = orderNumberGenerator;
_additionalValuesFormatter = additionalValuesFormatter;
_paymentActions = paymentActions;
}
开发者ID:Amulius112,项目名称:PayEx.EPi.Commerce.Payment,代码行数:12,代码来源:DirectBankDebit.cs
示例13: FillData
public FillResult FillData(FillDataMode mode, DataTable rawData, Mediachase.MetaDataPlus.Import.Rule rule, int maximumErrors)
{
using (DbTransaction tran = DbTransaction.Begin())
{
FillResult retVal = FillData(mode, rawData, rule, Security.CurrentUser.UserID, DateTime.UtcNow, DbContext.Current.Transaction);
if (maximumErrors == -1 || retVal.ErrorRows <= maximumErrors)
tran.Commit();
else tran.Rollback();
return retVal;
}
}
开发者ID:0anion0,项目名称:IBN,代码行数:12,代码来源:IncidentMappingMetaClass.cs
示例14: MasterPass
} // Needed for unit testing
public MasterPass(Mediachase.Commerce.Orders.Payment payment, IPaymentManager paymentManager,
IParameterReader parameterReader, ICartActions cartActions, IOrderNumberGenerator orderNumberGenerator,
IAdditionalValuesFormatter additionalValuesFormatter, IPaymentActions paymentActions,
IMasterPassShoppingCartFormatter masterPassShoppingCartFormatter)
: base(payment)
{
_paymentManager = paymentManager;
_parameterReader = new MasterPassParameterReader(parameterReader);
_cartActions = cartActions;
_orderNumberGenerator = orderNumberGenerator;
_additionalValuesFormatter = new MasterPassAdditionalValuesFormatter(additionalValuesFormatter,
_parameterReader.AddShoppingCartXml(this.PaymentMethodDto), masterPassShoppingCartFormatter);
_paymentActions = paymentActions;
}
开发者ID:Amulius112,项目名称:PayEx.EPi.Commerce.Payment,代码行数:16,代码来源:MasterPass.cs
示例15: ArgumentNullException
/// <summary>
/// Determines whether this instance can create the specified meta class.
/// </summary>
/// <param name="metaClass">The meta class.</param>
/// <returns>
/// <c>true</c> if this instance can create the specified meta class; otherwise, <c>false</c>.
/// </returns>
bool IMetaObjectFactory.CanCreate(Mediachase.Ibn.Data.Meta.Management.MetaClass metaClass)
{
if(metaClass==null)
throw new ArgumentNullException("metaClass");
switch (metaClass.Name)
{
case "TimeTrackingEntry":
case "TimeTrackingBlock":
case "TimeTrackingBlockType":
case "TimeTrackingBlockTypeInstance":
return true;
}
return false;
}
开发者ID:0anion0,项目名称:IBN,代码行数:23,代码来源:TimeTrackingObjectFactory.cs
示例16: GetUrl
protected string GetUrl(int ID, Mediachase.IBN.Business.CalendarView.CalendarFilter Type)
{
switch (Type)
{
case Mediachase.IBN.Business.CalendarView.CalendarFilter.Appointment:
return "../Events/EventView.aspx?EventID=" + ID;
case Mediachase.IBN.Business.CalendarView.CalendarFilter.Event:
return "../Events/EventView.aspx?EventID=" + ID;
case Mediachase.IBN.Business.CalendarView.CalendarFilter.Task:
case Mediachase.IBN.Business.CalendarView.CalendarFilter.MileStone:
return "../Tasks/TaskView.aspx?TaskID=" + ID;
case Mediachase.IBN.Business.CalendarView.CalendarFilter.Meeting:
return "../Events/EventView.aspx?EventID=" + ID;
case Mediachase.IBN.Business.CalendarView.CalendarFilter.ToDo:
return "../ToDo/ToDoView.aspx?ToDoID=" + ID;
}
return "";
}
开发者ID:0anion0,项目名称:IBN,代码行数:18,代码来源:ProjectCalendarWrapper2.ascx.cs
示例17: GetProperties
/// <summary>
/// Gets the properties.
/// </summary>
/// <param name="element">The element.</param>
/// <returns></returns>
public override Mediachase.Net.Wdom.PropertyInfoCollection GetProperties(Mediachase.Net.Wdom.WebDavElementInfo element)
{
PropertyInfoCollection retVal = null;
PropertyInfo prop = null;
WebDavDocument tmpDoc = WebDavDocument.CreateDocument();
if (element == null)
return retVal;
retVal = new PropertyInfoCollection();
//FileInfo fileInfo = !!!!(FileInfo)element.Tag;!!!
WebDavTicket ticket = WebDavTicket.Parse(element.AbsolutePath);
WebDavStorageElementPropertiesRow row = GetWebDavStoragePropertyRow(ticket.AbsolutePath.StorageType, ticket.AbsolutePath.UniqueId);
if (row != null)
{
retVal = Mediachase.Ibn.Data.McXmlSerializer.GetObject<PropertyInfoCollection>(row.Value);
}
#region CreateDefaultProperties
foreach (PropertyInfo defaultProp in PropertyInfo.CreateDefaultProperties(element))
{
SetPropertyAndSave(retVal, defaultProp, false, false);
}
#endregion
//Add <supportedlock> property
if (((int)(WebDavApplication.Class & WebDavServerClass.Class2)) != 0)
{
prop = PropertyInfo.CreateSupportedLockProperty();
prop.Calculated = false;
SetPropertyAndSave(retVal, prop, false, false);
}
//Add <resourcetype> property
prop = PropertyInfo.CreateResourceTypeProperty(element);
SetPropertyAndSave(retVal, prop, false, false);
//Assign context and set closure to class member
retVal.ElementInfo = element;
return retVal;
}
开发者ID:0anion0,项目名称:IBN,代码行数:48,代码来源:WebDavPropertyStorage.cs
示例18: OpenWrite
/// <summary>
/// Opens the write.
/// </summary>
/// <param name="element">The element.</param>
/// <returns></returns>
public override System.IO.Stream OpenWrite(Mediachase.Net.Wdom.WebDavElementInfo element, long contentLength)
{
if (element == null || element is CollectionInfo)
return null;
Mediachase.Ibn.Data.Meta.FileInfo fileInfo = (Mediachase.Ibn.Data.Meta.FileInfo)element.Tag;
try
{
AutoCommitedTransactedStream tranStream = new AutoCommitedTransactedStream(DataContext.Current.BeginTransaction(), contentLength);
tranStream.InnerStream = fileInfo.OpenWrite();
tranStream.SetLength(0);
return tranStream;
}
catch (Exception)
{
throw new HttpException(404, "Not Found");
}
}
开发者ID:0anion0,项目名称:IBN,代码行数:24,代码来源:MetaDataProvider.cs
示例19: LineItem
public LineItem(Mediachase.Commerce.Orders.LineItem lineItem, string language)
{
Code = lineItem.Code;
Name = lineItem.GetStringValue(Constants.Metadata.LineItem.DisplayName);
ArticleNumber = lineItem.GetStringValue(Constants.Metadata.LineItem.ArticleNumber);
ImageUrl = lineItem.GetString(Constants.Metadata.LineItem.ImageUrl);
Color = lineItem.GetStringValue(Constants.Metadata.LineItem.Color);
ColorImageUrl = lineItem.GetStringValue(Constants.Metadata.LineItem.ColorImageUrl);
Description = lineItem.GetStringValue(Constants.Metadata.LineItem.Description);
Size = lineItem.GetStringValue(Constants.Metadata.LineItem.Size);
PlacedPrice = lineItem.PlacedPrice;
LineItemTotal = lineItem.Quantity * lineItem.PlacedPrice;
LineItemDiscount = lineItem.LineItemDiscountAmount;
LineItemOrderLevelDiscount = lineItem.OrderLevelDiscountAmount;
Quantity = Convert.ToInt32(lineItem.Quantity);
Url = lineItem.GetEntryLink(language);
Discounts = lineItem.Discounts.Cast<Discount>().Select(x => new DiscountItem(x)).ToList();
IsInventoryAllocated = lineItem.IsInventoryAllocated;
}
开发者ID:episerver,项目名称:Commerce-Demo-Kit,代码行数:19,代码来源:LineItem.cs
示例20: ProcessImage
public static Image ProcessImage(Mediachase.FileUploader.Web.McHttpPostedFile file, int maxWidth, int maxHeight, out string extension)
{
extension = file.FileName.Substring(file.FileName.LastIndexOf("."));
Image img = System.Drawing.Image.FromStream(file.InputStream);
if (img.Height > maxHeight || img.Width > maxWidth)
{
System.IO.Stream mem = new System.IO.MemoryStream();
ImageCodecInfo imageCodecInfo = GetEncoderInfo("image/jpeg");
Encoder encoder = Encoder.Quality;
EncoderParameters encoderParameters = new EncoderParameters(1);
encoderParameters.Param[0] = new EncoderParameter(encoder, 100L);
CorrectImageSize(maxWidth, maxHeight, img).Save(mem, imageCodecInfo, encoderParameters);
img = System.Drawing.Image.FromStream(mem);
extension = ".jpg";
}
return img;
}
开发者ID:0anion0,项目名称:IBN,代码行数:21,代码来源:Images.cs
注:本文中的Mediachase类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论